Avro Schema Viewer

Parse and visualize Apache Avro schema JSON files as a collapsible tree.

Free Apache Avro schema viewer. Parses Avro schema JSON (record, enum, array, union, map, fixed), validates structural rules, and renders a collapsible tree. Ideal for Kafka and Confluent Schema Registry work — fully client-side, nothing uploaded. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What Avro types does this support?

It handles all primitive types (null, boolean, int, long, float, double, bytes, string) and the complex types record, enum, array, map, union, and fixed. Logical types attached to primitives are shown as a detail.

Apache Avro is a compact, schema-driven serialization format widely used with Kafka and the Confluent Schema Registry. An Avro schema is itself a JSON document describing records, enums, arrays, maps, unions, and fixed-size byte blobs. When schemas grow nested it becomes hard to read the raw JSON, so this viewer turns it into a collapsible tree and checks its structure.

How it works

The parser walks the schema recursively according to the Avro specification:

  • A string that is a primitive name (int, string, etc.) is a leaf; any other string is treated as a reference to a previously named type.
  • A JSON array is a union — each element is a branch, commonly used as ["null", "string"] for nullable fields.
  • A record must carry a name and a fields array; each field needs a name and a type, and an optional default is shown alongside it.
  • enum needs symbols, array needs items, map needs values, and fixed needs a numeric size.

As it walks, it collects any structural violations and reports them with a JSON-path-style location so you can jump straight to the problem.

Example schema and rendered output

A minimal Avro record for a user event:

{
  "type": "record",
  "name": "UserEvent",
  "namespace": "com.example",
  "fields": [
    { "name": "userId", "type": "string" },
    { "name": "email",  "type": ["null", "string"], "default": null },
    { "name": "role",   "type": { "type": "enum", "name": "Role", "symbols": ["ADMIN", "USER", "GUEST"] } },
    { "name": "tags",   "type": { "type": "array", "items": "string" }, "default": [] }
  ]
}

The viewer renders this as a tree rooted at UserEvent (record) with four child field nodes. The email field becomes a union node with null and string branches, showing the default value alongside. The role field expands to show ADMIN | USER | GUEST. The tags field shows array → string.

Common structural errors caught

ErrorLocation exampleWhy it matters
Record missing fieldsUserEventA record without fields is invalid and unusable as a schema
Field missing namefields[2]Consumers reference fields by name; nameless fields cannot be deserialized
Enum with empty symbolsfields[2].typeAn enum with no values can never hold a valid state
Fixed missing sizechecksum (fixed)Fixed types have a known byte length; omitting it breaks encoding
Union default type mismatchemail.defaultThe default for a union must match the first branch type (if null first, default must be null)

What structural validity does not check

This viewer confirms the schema is well-formed JSON that follows Avro’s type rules. It does not check:

  • Compatibility with a registered schema version. Adding a field without a default breaks backward compatibility; removing a field without checking consumers breaks forward compatibility. The Confluent Schema Registry enforces these rules when you register a new version.
  • Whether referenced named types exist. If your schema references a named type (e.g. "type": "com.example.Address") defined in a separate file, this viewer treats it as an external reference and does not validate its definition.
  • Data conformance. This tool validates the schema document structure, not individual Avro-encoded records.

For producer/consumer compatibility testing, a clean structural pass here is the prerequisite, but you still need the Schema Registry’s compatibility mode (BACKWARD, FORWARD, FULL) for complete validation.