Excel To Avro Schema

Login

Email
Password

Don't have an account yet?

Go to Sign up

{{ workbook ? 'Online Table Editor' : 'Input Data' }}
Change File Enter Data
Row Col Row Col
Transpose Clear Delete Empty Deduplicate
ABC abc Abc
Replace
First Row as Header
{{ displayRows.length }} rows x {{ displayHeaders.length }} columns{{ firstRowAsHeader ? ' (1 header)' : '' }} {{ selectedRows.length > 0 ? selectedRows.length + ' selected' : '' }}
Output Data
{{ copied ? 'Copied!' : 'Copy to Clipboard' }} Download File
Properties
Convert Excel to Avro Schema online — paste, edit, and download Avro.

Convert Restart
Insert Row Below
Insert Row Above
Insert Column Right
Insert Column Left
Delete Row {{ contextMenu.row + 1 }}
Delete Column {{ contextMenu.col + 1 }}
Clear Cell
Clear Row
Case sensitive Use regex Cancel Replace All

What Is Apache Avro?

Apache Avro is a data serialization system developed within the Apache Software Foundation. It provides a compact, fast, binary data format with rich data structures, and relies on JSON-based schemas to define data types and protocols. Avro is a core component of the Apache big data ecosystem:  

  • Apache Kafka — Avro is the most popular schema format for Kafka's Confluent Schema Registry.

  • Apache Spark — Avro is a supported data source format for Spark SQL and Structured Streaming.

  • Apache Hadoop — Avro is the native serialization format for Hadoop MapReduce and HDFS.

  • Apache Flink — Avro schemas are used for Flink's event-time streaming pipelines.

The official Apache Avro specification is available at avro.apache.org/docs.  

What Is an Avro Schema?

An Avro schema is a JSON document that defines the structure of serialized data. Avro schemas support two categories of types:  

Primitive Types

Avro TypeDescriptionExample Value
nullNo valuenull
booleanTrue or falsetrue
int32-bit signed integer42
long64-bit signed integer1700000000
floatSingle precision (32-bit) IEEE 7543.14
doubleDouble precision (64-bit) IEEE 7543.141592653589793
bytesSequence of 8-bit unsigned bytes"\u00ff"
stringUnicode character sequence"hello"

Complex Types

Avro also supports record, enum, array, map, union, fixed, and nested schemas. The most common is the record type:

{
 "type": "record",
 "name": "User",
 "namespace": "com.example",
 "fields": [
   {"name": "id", "type": "long"},
   {"name": "name", "type": "string"},
   {"name": "active", "type": "boolean"},
   {"name": "score", "type": ["null", "double"]}
 ]
}

What Is Excel to Avro Schema?

Excel to Avro Schema is a free online tool that converts spreadsheet column definitions from Excel files (.xlsx, .xls, .xlsm) into Apache Avro record schemas. Each column in your spreadsheet becomes a field in the generated Avro schema. The tool processes everything in your browser — your files are never uploaded to any server.  

Core Features

  • Instant Schema Generation — Convert Excel column headers to Avro record schema fields with one click.

  • Multi-Sheet Support — Select which worksheet to convert from multi-sheet workbooks.

  • Built-in Table Editor — Edit cells, transpose, deduplicate, and transform data before conversion.

  • First Row as Header — Toggle to use the first row as field names or generic column letters.

  • Output Includes Data — Generates both the schema and the data rows in JSON format.

  • Copy and Download — Copy the Avro output to clipboard or download as a .avro.json file.

  • 100% Client-Side Processing — No data leaves your device.

How to Use Excel to Avro Schema

Step 1: Upload or Enter Your Data

Drag and drop an Excel file (.xlsx, .xls, or .xlsm) onto the upload area, or click to browse. Alternatively, click Enter Data to type column definitions manually.  

Step 2: Edit Your Data (Optional)

After loading, your data appears in an editable table. Use the toolbar to modify cells, add or remove rows and columns, transpose data, remove duplicates and empty rows, change text case, or find and replace values. Toggle First Row as Header to define column names.  

Step 3: Convert to Avro Schema

Click Convert in the Properties panel. The tool generates a JSON object containing:  

  • "schema" — An Avro record schema with "type": "record", "name": "Record", and a "fields" array.

  • "data" — An array of objects representing each row as key-value pairs.

Conversion Example

Given this Excel table with column headers:

idnamepriceactive
1Widget A29.99true
2Widget B49.99false

The tool generates:

{
 "schema": {
   "type": "record",
   "name": "Record",
   "fields": [
     { "name": "id",     "type": "string" },
     { "name": "name",   "type": "string" },
     { "name": "price",  "type": "string" },
     { "name": "active", "type": "string" }
   ]
 },
 "data": [
   { "id": "1", "name": "Widget A", "price": "29.99", "active": "true" },
   { "id": "2", "name": "Widget B", "price": "49.99", "active": "false" }
 ]
}

Note: The current version maps all fields to "string" type. For production Avro schemas used with Kafka Schema Registry or Spark, manually update field types to the appropriate Avro primitive types (int, long, double, boolean, null) or use union types like ["null", "string"] for nullable fields.

Step 4: Copy or Download

Click Copy to Clipboard to copy the output into your project. For file download, use the Download button (requires Premium Plan). The file is saved with a .avro.json extension.  

Avro vs Other Serialization Formats

FeatureAvroProtobufParquetJSON
Schema LanguageJSONProto IDLEmbedded (Parquet metadata)None / JSON Schema
Data FormatBinaryBinaryColumnar binaryText
Schema EvolutionFull (add/remove/default)PartialLimitedNone
Kafka Native SupportYes (Schema Registry)Yes (Schema Registry)NoNo
Spark Data SourceYesYesYes (native)Yes
CompressionSnappy, Deflate, ZstandardVarint, wire formatSnappy, Gzip, ZstandardGzip (external)

Common Use Cases

  • Kafka Schema Registry — Define Avro schemas for Kafka topics, register them in Confluent Schema Registry, and produce/consume typed messages.

  • Spark Data Pipelines — Create Avro schemas for Spark SQL data sources used in ETL jobs and Structured Streaming.

  • Hadoop HDFS StorageGenerate Avro schemas for HDFS files in MapReduce, Hive, and Impala tables.


  • Data Contract Definition — Define data contracts between microservices using Avro as the schema language.

  • Database Migration to Big Data — Export database table definitions from Excel and generate Avro schemas for the target data lake.

  • Event Schema Design — Design event schemas for streaming platforms (Kafka, Kinesis, Event Hubs) in a spreadsheet and convert to Avro.

  • Documentation — Keep data model documentation in Excel and regenerate Avro schemas when the model evolves.

Frequently Asked Questions (FAQ)

  • Is my Excel data uploaded to a server?

    No. All file parsing and Avro schema generation happens entirely in your browser using client-side JavaScript. Your files are never uploaded, transferred, or stored on any server. The tool works offline once the page has loaded.

  • What Excel file formats are supported?

    The tool supports .xlsx (Excel 2007+), .xls (Excel 97-2003), and .xlsm (macro-enabled) files. Multi-sheet workbooks are supported — use the sheet selector to choose which sheet to convert.

  • Why are all fields typed as "string" in the generated schema?

    The current version maps all columns to Avro "string" type. For production use with Kafka Schema Registry or Spark, manually update field types to the appropriate Avro primitives (int, long, double, boolean) or use union types like ["null", "string"] for nullable fields. Future versions will include automatic type inference.

  • What is the difference between Avro and JSON?

    JSON is a text-based data format without a built-in schema. Avro uses JSON for schema definition but serializes data in a compact binary format. Avro schemas enable type safety, schema evolution, and efficient compression — making it suitable for high-throughput systems like Kafka and Hadoop. JSON is better for human-readable APIs and configuration files.

  • How do I use the generated schema with Kafka Schema Registry?

    Copy the "schema" object from the output and register it with Confluent Schema Registry using the REST API or CLI. Example: curl -X POST -H "Content-Type: application/vnd.schemaregistry.v1+json" --data '{"schema": "{\"type\":\"record\",...}"}' http://localhost:8081/subjects/my-topic-value/versions. Ensure field types are updated from "string" to proper Avro types before registration.

  • What is a union type in Avro?

    A union type in Avro is represented as a JSON array of types, e.g., ["null", "string"]. It allows a field to hold values of different types. The most common use is nullable fields — ["null", "string"] means the field can be null or a string. Union types are essential for schema evolution and handling optional data in Kafka and Spark.

  • Can I edit the data before converting?

    Yes. After uploading your file, the built-in table editor lets you modify cell values, add or remove rows and columns, transpose data, remove duplicates and empty rows, change text case, and find-and-replace — all before generating the Avro schema.

  • What is the Avro record name and namespace?

    In Avro, every record schema has a "name" (the record type name, e.g., "User") and an optional "namespace" (a dot-separated qualifier like "com.example.models"). The namespace prevents naming conflicts between schemas. The current tool defaults to "name": "Record" with no namespace. You can modify the output JSON to set your own values.

  • What is schema evolution in Avro?

    Schema evolution allows you to modify an Avro schema over time while maintaining compatibility with data written using older schemas. Avro supports adding fields with defaults, removing fields, and renaming fields via aliases. Confluent Schema Registry enforces compatibility rules (BACKWARD, FORWARD, FULL) to ensure schema changes don't break consumers.

  • Can I use this tool without uploading a file?

    Yes. Click the Enter Data button to open a blank editor where you can type or paste column definitions manually, then generate the Avro schema.

Featured Tools

Featured tools that you might find useful.

Popular Tools

List of popular tools that users love and frequently use.

New Tools

The latest tools added to our collection, designed for you.

Topics

The tools grouped by topics to quickly find what you need.
Free online Excel to JSON converter. Transform XLSX, XLS, XLSM files into JSON arrays, objects, or keyed formats instantly in your browser — no upload, 100% private.

Excel To JSON

Free online Excel to JSON converter. Transform XLSX, XLS, XLSM files into JSON arrays, objects, or keyed formats instantly in your browser — no upload, 100% private.
Free Excel to CSV converter. Convert XLSX, XLS, XLSM to CSV instantly in your browser. No upload, 100% private. Edit, transpose, deduplicate before exporting.

Excel To CSV

Free Excel to CSV converter. Convert XLSX, XLS, XLSM to CSV instantly in your browser. No upload, 100% private. Edit, transpose, deduplicate before exporting.
Free online Excel to SQL converter. Generate CREATE TABLE and INSERT statements from spreadsheets for MySQL, PostgreSQL, SQLite, and SQL Server. Supports batch insert, primary keys, and type inference.

Excel To SQL

Free online Excel to SQL converter. Generate CREATE TABLE and INSERT statements from spreadsheets for MySQL, PostgreSQL, SQLite, and SQL Server. Supports batch insert, primary keys, and type inference.
Free online Excel to ASCII table converter with 10 border styles (MySQL, Unicode, reStructuredText, and more). Add code comment wrappers in 8 languages. Supports text alignment. Client-side processing.

Excel To ASCII Table

Free online Excel to ASCII table converter with 10 border styles (MySQL, Unicode, reStructuredText, and more). Add code comment wrappers in 8 languages. Supports text alignment. Client-side processing.