Excel to Avro Converter

Convert Excel to Apache Avro schema and data format

About the Excel to Avro Converter

The Excel to Avro converter turns your Excel spreadsheets (.xlsx, .xls) into a valid Apache Avro record schema and example binary data. It is ideal when you need to move data from Excel into big data pipelines, Kafka topics, Hadoop, or Avro-based data lakes.

Key Features

  • Excel support: Works with .xlsx and .xls files with one or more worksheets.
  • Automatic header handling: Use the first row as Avro field names, or auto-generate field_1, field_2, etc.
  • Custom schema name and namespace: Configure the name and namespace for your Avro record type.
  • Instant schema preview: See the generated record schema and a sample record from your sheet.
  • One-click export: Copy the output or download it as an .avsc file for use in your applications.
  • Browser-only processing: Files never leave your device, which is ideal for sensitive data.

How to Use the Excel to Avro Tool

  1. Upload your Excel file: Click the upload area or drag and drop a .xlsx / .xls file. The tool reads the workbook and lists sheet names automatically.
  2. Select the worksheet: Choose the sheet that contains the data you want to convert to Avro.
  3. Configure schema options: Set the schema name, namespace, and whether the first row is a header row.
  4. Review the generated Avro: The tool automatically creates a record schema with fields mapped from your columns and shows a sample record encoded as binary.
  5. Copy or download: Use the Copy button to paste into your schema registry, or Download Schema to save the output as an Avro schema file.

Example: Excel to Avro Schema

Suppose your Excel sheet looks like this:

  • Row 1 (header): id, name, email
  • Row 2: 1, Alice, alice@example.com

The converter will generate an Avro schema similar to:

{
  "type": "record",
  "name": "MyRecord",
  "namespace": "com.example",
  "fields": [
    { "name": "id", "type": ["null", "string"] },
    { "name": "name", "type": ["null", "string"] },
    { "name": "email", "type": ["null", "string"] }
  ]
}

The tool also generates an example record in Avro binary (shown as hex) so you can quickly verify how your data will be serialized.

When Should You Use Excel to Avro?

  • Kafka & event streaming: Move tabular business data from Excel into Kafka topics using Avro schemas.
  • Data lake onboarding: Standardize Excel exports into Avro format before loading into Hadoop, Spark, or cloud data lakes.
  • Schema design & testing: Quickly prototype Avro record structures from real Excel samples.
  • Integration with Avro-based APIs: Generate schemas your backend services or microservices can share and validate against.

Best Practices for Clean Avro Schemas

  • Use clear, machine-friendly column names in Excel (e.g. customer_id instead of Customer ID).
  • Keep one table per sheet and avoid merged cells or multi-row headers.
  • Check the output field names after conversion; they are sanitized from your header row.
  • Once you are happy with the schema, store it in your schema registry or code repository.

FAQ – Excel to Avro Converter

Does this tool upload my Excel file to a server?

No. All processing happens locally in your browser using JavaScript. Your Excel file and Avro output never leave your device.

Can I change field types (e.g. int, boolean) in the schema?

This tool focuses on quick conversion and currently treats all fields as nullable strings (["null", "string"]). You can manually adjust field types in the generated schema if you need int, long, double, or boolean types.

What happens if my Excel sheet is empty?

If the selected worksheet has no data, the tool will show a helpful message and will not generate a schema. Make sure you selected the correct sheet and that it has at least one row of data.

Is this Excel to Avro converter free to use?

Yes, the tool is completely free, requires no registration, and is designed for fast, one-off conversions as well as regular data preparation tasks.