Markdown To Avro Schema

Login

Email
Password

Don't have an account yet?

Go to Sign up

Input Data
Sample {{ showCoderInput ? 'Choose File' : 'Enter Data' }}

                                
Valid Data Invalid Data — Cannot parse as table
Online Table Editor
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 ({{ jsonFormatDisplayName }})
{{ copied ? 'Copied!' : 'Copy to Clipboard' }} Download File
Properties
Convert Markdown Table to Avro Schema online — paste, edit, and download.

Schema Name:
Namespace:
Field Type Detection:
Indent Size:
Minify Output
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 the Markdown To Avro Schema Converter?

The Markdown To Avro Schema Converter on A.Tools transforms Markdown pipe-delimited tables into Apache Avro schema definitions in JSON format. Five settings let you configure the schema name, namespace, field type detection, indentation, and output minification. All processing runs in your browser. No data leaves your device.

Apache Avro is a data serialization framework widely used in Apache Kafka, Hadoop, Spark, and big data pipelines. Avro schemas define the structure of your data — field names, types, and optional defaults — enabling schema evolution, strong typing, and efficient binary serialization.

How to Convert Markdown Tables to Avro Schema?

Step 1: Provide Your Markdown Data

Click Enter Data to paste a Markdown table into the input area, or click Choose File to drag and drop a .md file. Press Sample to load example data.

Step 2: Edit in the Online Table Editor

Once parsed, an interactive spreadsheet appears. Use the toolbar to:

  • Add or delete rows and columns

  • Transpose the table (swap rows and columns)

  • Remove duplicate rows

  • Delete empty rows and columns

  • Change text case (UPPERCASE, lowercase, Capitalize)

  • Find and replace values — supports case-sensitive search and regex

  • Toggle First Row as Header to define field names

Right-click any cell for context-menu operations.

Step 3: Configure Settings

In the Properties panel:

SettingDefaultDescription
Schema Name(empty)Name of the Avro record type
Namespace(empty)Java-style package namespace for the schema
Field Type DetectionOnAuto-detect field types from data values
Indent Size2Number of spaces per indentation level
Minify OutputOffRemove whitespace for compact JSON

Step 4: Export

Click Convert to generate the Avro schema JSON. Use Copy to Clipboard or Download File to save as an .avsc file.

Key Features

  • Two input modes: Paste Markdown directly or upload a .md file via drag-and-drop

  • Full table editor: Edit, transpose, deduplicate, find-and-replace before converting

  • Auto type detection: Infer Avro types (string, int, long, float, double, boolean) from data values

  • Schema name and namespace: Configure the record name and Java-style namespace

  • Indent control: Set indentation to 2, 4, or 8 spaces — or use tab characters

  • Minified output: Strip whitespace for compact schema JSON

  • Client-side processing: Files never leave the browser — zero data upload

  • Undo/Redo: Full edit history with revert support

  • Context menu: Right-click for quick row/column/cell operations

  • Header toggle: Treat the first row as field names or regular data

  • Validation indicator: Real-time feedback on input validity

What the Output Looks Like

Given this Markdown input:

| name  | age | score | active |

|-------|-----|-------|--------|

| Alice | 30  | 95.5  | true   |

| Bob   | 25  | 87.3  | false  |

With Schema Name "UserRecord", Namespace "com.example"

{
 "type": "record",
 "name": "UserRecord",
 "namespace": "com.example",
 "fields": [
   {
     "name": "name",
     "type": "string"
   },
   {
     "name": "age",
     "type": "int"
   },
   {
     "name": "score",
     "type": "double"
   },
   {
     "name": "active",
     "type": "boolean"
   }
 ]
}

With Field Type Detection off (all strings)

{
 "type": "record",
 "name": "UserRecord",
 "namespace": "com.example",
 "fields": [
   {
     "name": "name",
     "type": "string"
   },
   {
     "name": "age",
     "type": "string"
   },
   {
     "name": "score",
     "type": "string"
   },
   {
     "name": "active",
     "type": "string"
   }
 ]
}

With Minify Output enabled

{"type":"record","name":"UserRecord","namespace":"com.example","fields":[{"name":"name","type":"string"},{"name":"age","type":"int"},{"name":"score","type":"double"},{"name":"active","type":"boolean"}]}

Nullable fields (union types)

When a column contains both values and empty cells, the tool may generate nullable union types:

{
 "name": "middle_name",
 "type": ["null", "string"]
}

Understanding Apache Avro Schemas

What is Apache Avro?

Apache Avro is a data serialization system that provides rich data structures, a compact binary format, and schema evolution. It is the default serialization format for Apache Kafka and is widely used in Hadoop, Spark, and Flink ecosystems.

Avro schema structure

An Avro schema is a JSON document that defines a data type. For records:

{
 "type": "record",
 "name": "SchemaName",
 "namespace": "com.example.namespace",
 "doc": "Description of the record",
 "fields": [
   {
    "name": "field1",
    "type": "string"
   },
   {
    "name": "field2",
    "type": "int"
   }
 ]
}

Avro primitive types

TypeDescriptionJSON Example
nullNo valuenull
booleanTrue or falsetrue
int32-bit signed integer42
long64-bit signed integer9223372036854775807
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"

Avro complex types

TypeDescriptionSchema Example
recordStructured object with named fields{"type":"record","name":"...","fields":[...]}
enumNamed set of values{"type":"enum","name":"...","symbols":["A","B"]}
arrayOrdered collection{"type":"array","items":"string"}
mapKey-value pairs{"type":"map","values":"string"}
unionOne of several types["null","string"]
fixedFixed-size binary{"type":"fixed","name":"...","size":16}

Avro vs Protobuf vs JSON Schema

FeatureAvroProtobufJSON Schema
Schema formatJSON.proto IDLJSON
SerializationBinaryBinaryText (JSON)
Schema evolutionFull (add/remove fields)LimitedFull
Type safetyStrongStrongValidation only
Kafka supportDefaultVia pluginVia plugin
Code generationYesYesLimited
Namespace supportJava-style packagesJava-style packagesURI-based
Used byKafka, Hadoop, SparkgRPC, Google servicesREST APIs, validation
File extension.avsc.proto.json

Schema evolution

Avro supports forward and backward compatibility through schema evolution rules:

  • Add a field — Backward compatible if a default value is provided

  • Remove a field — Forward compatible if a default value was provided

  • Change a type — Generally not compatible (with narrow exceptions)

  • Rename a field — Compatible using aliases

This makes Avro ideal for Kafka topics where producers and consumers evolve independently.

Where Avro schemas are used

PlatformUsage
Apache KafkaDefault serialization with Confluent Schema Registry
Confluent PlatformSchema Registry stores and enforces schemas
AWS GlueSchema Registry for Kinesis and MSK
Apache HadoopFile format for MapReduce and Hive
Apache SparkData source format for batch and streaming
Apache FlinkStream processing serialization
Azure Event HubsSchema Registry for event schemas
Apache NiFiData flow schema validation

Settings Explained

Schema Name

The name of the Avro record type. This becomes the "name" field in the schema JSON and is used for code generation and class naming.

{
 "type": "record",
 "name": "MySchemaName",
 ...
}

Naming rules:

  • Must start with a letter or underscore

  • Can contain letters, digits, and underscores

  • Use PascalCase for readability: UserRecord, OrderEvent, SensorReading

  • Avoid spaces and special characters

Namespace

A Java-style package namespace that qualifies the schema name. Combined with Schema Name, it creates a fully qualified name: com.example.UserRecord.

{
 "type": "record",
 "name": "UserRecord",
 "namespace": "com.company.project.models",
 ...
}

Common namespace patterns:

PatternExample
Company domaincom.example
Project-specificcom.example.orderservice
Domain modelcom.example.models.events
Kafka topiccom.example.kafka.schemas

Field Type Detection

Controls how field types are determined:

ModeBehavior
Auto-detect (on)Analyzes data values to infer types: "42"int, "3.14"double, "true"boolean
All strings (off)All fields are typed as string regardless of data values

When to use auto-detect:

  • Your data contains a mix of types (strings, numbers, booleans)

  • You want the schema to accurately reflect the data

  • The schema will be used for Kafka serialization with type enforcement

When to use all strings:

  • You want to defer type decisions to the consumer

  • Your data is inconsistent (mixed types in the same column)

  • You are prototyping and prefer simplicity

Indent Size

Number of spaces per indentation level in the output JSON. Options: 2, 4, 8, or tab.

SizeConvention
2 spacesStandard for Avro schemas and most JSON projects
4 spacesCommon in enterprise Java environments
8 spacesLegacy style
TabPersonal preference

Minify Output

Removes all whitespace, newlines, and indentation from the schema JSON. Useful for:

  • Registering schemas via REST API (smaller payload)

  • Embedding schemas in configuration files

  • Storing schemas in metadata fields with size constraints

Use Cases: When to Convert Markdown to Avro Schema

ScenarioWhy This Tool
Define Kafka topic schemasGenerate Avro schemas from data specification tables
Register schemas in Confluent Schema RegistryCreate .avsc files ready for registration
Design data models for Hadoop/HiveConvert data dictionaries to Avro record definitions
Prototype Kafka producersGenerate schemas from sample data tables
Create Spark data source schemasDefine Avro schemas for batch and streaming jobs
Document data contractsTurn specification tables into machine-readable schemas
Set up AWS Glue Schema RegistryGenerate schemas for Kinesis Data Streams or MSK
Generate code from schemasCreate Avro IDL for Java, Python, or C# code generation

Kafka Producer Example (Java)

Properties props = new Properties();
props.put("bootstrap.servers", "localhost:9092");
props.put("key.serializer", "io.confluent.kafka.serializers.KafkaAvroSerializer");
props.put("value.serializer", "io.confluent.kafka.serializers.KafkaAvroSerializer");
props.put("schema.registry.url", "http://localhost:8081");

Producer
<String, GenericRecord> producer = new KafkaProducer<>(props);

Schema
schema = new Schema.Parser().parse(new File("user.avsc"));
GenericRecord user = new GenericData.Record(schema);
user.put("name", "Alice");
user.put("age", 30);
user.put("score", 95.5);
user.put("active", true);

ProducerRecord
<String, GenericRecord> record = new ProducerRecord<>("users", "alice", user);
producer.send(record);

Confluent Schema Registry Registration

curl -X POST \
 -H "Content-Type: application/vnd.schemaregistry.v1+json" \
 --data '{"schema": "{\"type\":\"record\",\"name\":\"UserRecord\",\"namespace\":\"com.example\",\"fields\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"age\",\"type\":\"int\"}]}"}' \
 http://localhost:8081/subjects/users-value/versions

Python with confluent-kafka

from confluent_kafka import Producer
from confluent_kafka.schema_registry import SchemaRegistryClient
from confluent_kafka.schema_registry.avro import AvroSerializer

schema_str = open("user.avsc").read()
schema_registry_conf = {"url": "http://localhost:8081"}
schema_registry_client = SchemaRegistryClient(schema_registry_conf)

avro_serializer = AvroSerializer(schema_registry_client,schema_str)
producer = Producer({"bootstrap.servers": "localhost:9092"})

def
delivery_report(err, msg):
   if err:
       print(f"Delivery failed: {err}")
user = {"name": "Alice", "age": 30, "score": 95.5, "active": True}
producer.produce(
   topic="users",
   value=avro_serializer(user, None),
   on_delivery=delivery_report
)
producer.flush()

Spark Read with Avro Schema

from pyspark.sql import SparkSession
spark = SparkSession.builder.getOrCreate()
df = spark.read \
   .format("avro") \
   .option("avroSchema", open("user.avsc").read()) \
   .load("hdfs://path/to/data.avro")
df.show()

Frequently Asked Questions (FAQ)

  • Does this tool upload my files to a server?

    No. All file parsing and conversion runs in your browser using JavaScript. Your data stays on your device. A.Tools never receives, stores, or transmits your file contents.

  • What Markdown table formats are supported?

    The tool supports standard pipe-delimited Markdown tables following the CommonMark specification, including tables with or without leading/trailing pipes and alignment indicators.

  • What is Apache Avro?

    Apache Avro is a data serialization framework that uses JSON schemas to define data types and a compact binary format for serialization. It is the default serialization format for Apache Kafka and is widely used in Hadoop, Spark, and big data ecosystems.

  • What file extension should I use for Avro schemas?

    Use .avsc (Avro Schema) for schema definition files. Use .avro for binary data files that contain serialized records.

  • What is Field Type Detection?

    When enabled, the tool analyzes data values in each column to infer Avro types — integers become int, decimals become double, true/false becomes boolean, and everything else becomes string. When disabled, all fields are typed as string.

  • What is a namespace in Avro?

    A namespace is a Java-style package identifier that qualifies the schema name. It prevents naming conflicts between schemas. For example, com.example.orders.OrderEvent and com.example.users.OrderEvent are different schemas despite having the same record name.

  • How do I register the schema with Confluent Schema Registry?

    Use the Schema Registry REST API: send a POST request to http://localhost:8081/subjects/{topic}-value/versions with the schema JSON in the request body. The Minify Output option produces a compact format suitable for API payloads.

  • Can I edit the table before converting?

    Yes. After parsing, the full table editor lets you modify cells, add or remove rows and columns, transpose, deduplicate, change text case, and find-and-replace values.

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.