Avro Formatter: Validate and Pretty-Print Avro Schemas
Avro Formatter checks Avro schemas for parsing errors and produces readable, consistently indented output using a canonical key order such as type, name, namespace, and fields. You can optionally sort fields, minify the result, or emit a simplified Parsing Canonical Form. When a schema is invalid, the error includes a path to help locate the problem.
Avro Formatter is a browser-based tool for validating and pretty-printing Avro schemas. Use this Avro Formatter to turn hard-to-read schema content into consistently formatted output, check whether it parses, and inspect errors with a reported path. It can also produce a simplified Parsing Canonical Form.
The formatter uses a canonical key order, including type, name, namespace, and fields. You can choose the indentation and optionally sort fields, minify the output, or emit the simplified Parsing Canonical Form. These options let you tailor the presentation to your review or workflow, while schema errors include a path to help you find the relevant part of the input.
Avro schemas are expressed using JSON, and this tool formats Avro schema content rather than converting it into a different data format. Pretty-printed output is useful when you need to read or review a schema, while minified output removes formatting whitespace. A simplified Parsing Canonical Form is another available output option when that representation is useful to your task.
Avro Formatter is free and runs entirely in your browser: your input is processed on your device and is not uploaded, stored, or sent to a server. After the page has loaded, it works offline without a server connection. Developers and DevOps engineers can use it to check unfamiliar schemas, prepare readable snippets, and produce consistent output for reviews and commits.
Step 1: Paste or drop your Avro content into the formatter. It accepts Avro input and checks whether the schema can be parsed.
Step 2: Choose the indentation you want for readable output. Consistent indentation can make schema content easier to review.
Step 3: Select any additional options, such as sorting fields, minifying the output, or emitting a simplified Parsing Canonical Form.
Step 4: Review the formatted result and check for any schema errors. Errors include a path to help you identify the problem.
Step 5: Copy the output when it is ready to use in a code review, commit, or report.
Use case: Make an unreadable, machine-generated Avro file easier to review before you commit it. Consistent formatting helps you focus on the schema content.
Use case: Check an Avro document you did not write against the schema requirements you need to follow. The formatter reports parsing errors with a path.
Use case: Prepare consistently indented output before comparing schema changes. This helps reduce whitespace noise in a diff.
Use case: Format an Avro snippet before pasting it into a bug report or code review. Readable output makes the snippet easier for others to inspect.
Use case: Confirm that Avro input parses cleanly and locate schema errors by their reported path.
Use case: Sort fields when you want the formatted schema to follow a consistent field order. The option is available alongside the formatting controls.
Use case: Create a simplified Parsing Canonical Form when you need that representation of an Avro schema.