Avro Formatter

Format and validate Apache Avro schemas. Beautify or minify JSON-based Avro definitions with schema validation.

Formatted schema will appear here

Apache Avro Schema Formatting

Avro schemas define the structure of your data for serialization. Our formatter beautifies complex schemas, validates structure, and supports all Avro data types including records, enums, arrays, maps, and unions.

Schema Validation

Supported Avro Types

null
boolean
int
long
float
double
bytes
string
record
enum
array
map
union
fixed

How this Avro Formatter works

This schema formatting utility beautifies Apache Avro schema definitions by parsing JSON structure and applying consistent indentation for improved readability. Avro schemas define data serialization formats commonly used with Apache Kafka, Hadoop ecosystems, and event streaming platforms. The formatter validates schema structure checking for required fields like type, name, namespace, and proper field definitions.

The tool supports all Avro primitive types (null, boolean, int, long, float, double, bytes, string) and complex types (record, enum, array, map, union, fixed). Schema validation identifies missing required elements such as name fields for records, symbols arrays for enums, and items specifications for arrays. Warning messages suggest improvements like adding namespace declarations for better schema organization.

Sample schemas demonstrate common patterns including user records with nested types, event logs with enum fields, and product catalogs with decimal pricing. Minify mode compresses schemas for deployment while format mode expands them for editing. Export functionality downloads formatted schemas as .avsc files, the standard Avro schema extension. All processing occurs locally without external API calls, suitable for formatting proprietary schema definitions.

How to Use

1

Paste Avro Schema

Enter your Apache Avro schema in JSON format.

2

Format or Minify

Click Format for readable output or Minify to compress.

3

Validate & Export

View validation warnings and download as .avsc file.

Example Usage

Formatting an Avro schema:

Input
{"type":"record","name":"User","fields":[{"name":"id","type":"long"}]}
Output
{ "type": "record", "name": "User", "fields": [...] }

Frequently Asked Questions

What is Apache Avro?
Avro is a data serialization system developed by Apache. It uses JSON for schema definitions and supports rich data types, schema evolution, and is commonly used with Kafka and Hadoop.
What Avro types are supported?
All standard Avro types: null, boolean, int, long, float, double, bytes, string, record, enum, array, map, union, and fixed.
Does this validate my schema?
Yes! It checks for required fields like "type", "name" for records, "symbols" for enums, and provides warnings for missing namespace or unknown types.
What's the .avsc extension?
The .avsc extension is the standard file extension for Avro schema files. It stands for Avro Schema Container.

Related Tools

The Avro Formatter is maintained by CodeItBro. We aim to provide the best free developer tools on the web. If you have feedback or suggestions, please visit our contact page.