Don't like ads? Go Ad-Free Today

Apache Avro Schema Formatter & Validator

DataDeveloperText
ADVERTISEMENT · REMOVE?
[iotools_apache_avro_schema_formatter_validator]
ADVERTISEMENT · REMOVE?

Guide

Apache Avro Schema Formatter & Validator

Apache Avro Schema Formatter & Validator

Paste an Apache Avro JSON schema and get it pretty-printed and validated against the official Avro specification in your browser. The tool catches the issues a plain JSON linter or an LLM will miss — invalid type unions, default values that do not match the first union branch, duplicate field names, unresolved named-type references, enum symbols that violate naming rules, and more.

It also produces the Parsing Canonical Form defined by the Avro spec, which is the deterministic representation used for schema fingerprinting and producer/consumer compatibility checks.

How to Use

  1. Paste your .avsc schema (a JSON document) into the input area, or drop a file onto the uploader.
  2. Pick the indent style you want for the formatted output — 2 spaces, 4 spaces, a tab, or fully minified.
  3. Optionally tick Sort object keys alphabetically for deterministic diffs across schema revisions.
  4. Tick Output Parsing Canonical Form when you need the spec-defined fingerprint input. Indent and sort options are ignored in that mode.
  5. Read the green/red status bar above the output — it shows valid/invalid plus record, field, enum, union, and fixed counts. Warnings (such as a non-null default not matching the first union branch) appear beneath it.
  6. Use the copy or download button on the output to export the formatted schema.

Features

  • Strict Avro spec validation – checks primitive and complex types, name and namespace syntax, union branch rules, and duplicate named-type detection.
  • Default value compatibility – verifies each field default against its declared type, with special handling of the union first-branch rule.
  • Named-type resolution – resolves references like com.example.User against earlier definitions in the same document.
  • Parsing Canonical Form – emits the spec-defined deterministic JSON used for schema fingerprints.
  • Formatting options – 2/4 space, tab, or minified output, with optional alphabetical key sorting for stable diffs.
  • Inline statistics – record, field, enum, union, and fixed counts surfaced after every validation.
  • Runs entirely in your browser – no schema is uploaded to a server, so the tool is safe for proprietary or internal schemas.

ADVERTISEMENT · REMOVE?

FAQ

  1. What is Apache Avro?

    Apache Avro is a row-based data serialization system used heavily in the Hadoop and Kafka ecosystems. It describes data with a JSON schema and serializes payloads to a compact binary format. The schema travels with (or is referenced by) the data, which is what makes Avro popular for evolving data pipelines.

  2. Why do Avro defaults have to match the first branch of a union?

    Avro readers resolve a union by matching the writer's branch index to a reader's compatible branch. When a field is absent in the data, the reader has no index to look at, so the spec requires the default to be representable as the first branch of the reader's union. That is why nullable fields are conventionally written as ['null', T] with a null default.

  3. What is the Parsing Canonical Form?

    It is a normalized JSON serialization defined by the Avro spec. Short names are replaced with fully qualified names, non-essential attributes like doc and aliases are stripped, key order is fixed, and all whitespace is removed. Two schemas produce the same canonical form (and the same fingerprint) when they are semantically equivalent, even if their authored JSON differs.

  4. How are namespaces resolved?

    A name without a dot is qualified by the most tightly enclosing namespace. A name containing a dot is treated as a full name and used verbatim. Each record, enum, and fixed must have a unique fullname within the schema document.

  5. Are logical types supported?

    Logical types such as decimal, date, time-millis, and timestamp-millis are simply primitive Avro types with extra annotations. This tool validates the underlying primitive type and preserves the logical type metadata in the formatted output, but it does not enforce logical-type-specific constraints (for example, decimal precision and scale).

Want To enjoy an ad-free experience? Go Ad-Free Today

Install Our Extensions

Add IO tools to your favorite browser for instant access and faster searching

Add to Chrome Extension Add to Edge Extension Add to Firefox Extension Add to Opera Extension

Scoreboard Has Arrived!

Scoreboard is a fun way to keep track of your games, all data is stored in your browser. More features are coming soon!

ADVERTISEMENT · REMOVE?
ADVERTISEMENT · REMOVE?
ADVERTISEMENT · REMOVE?

News Corner w/ Tech Highlights

Get Involved

Help us continue providing valuable free tools

Buy me a coffee
ADVERTISEMENT · REMOVE?