JSON to Avro Schema Generator

Generate Apache Avro schemas from JSON data automatically. Perfect for Kafka producers, data pipelines, and Schema Registry configuration.

Input JSON
Drop JSON file here
Avro Schema Output

Features

📡 Avro Type Inference

  • string, int, long, double, boolean
  • Nested object → inline record
  • Array type inference
  • Null → nullable union types

Kafka Ready

  • Compatible with Schema Registry
  • Namespace support
  • Valid Avro JSON format
  • Download as .avsc file

🎯 Flexible Options

  • Custom record name
  • Custom namespace
  • Optional nullable unions
  • Optional doc comments

Avro Schema Guide

Avro Schema Structure

Apache Avro is a data serialization system built for the Hadoop/Kafka ecosystem, where schemas travel alongside (or are registered separately from) the binary-encoded data itself — the schema is what makes an otherwise opaque byte stream self-describing. A record schema is itself written in JSON, with a type, name, an optional namespace (Avro's equivalent of a Java package, used to avoid name collisions across teams), and a list of typed fields.

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

This tool infers Avro's primitive types from your JSON values (string, int/long, double, boolean), turns nested objects into inline nested records, infers array item types, and — when "nullable unions" is enabled — wraps every field type in a ["null", type] union so the schema tolerates missing fields, matching how most real-world data actually behaves.