Input

Output

What does Avro to TOON do?

You have an Apache Avro schema (.avsc) or a JSON-encoded Avro record, and you want a flatter, less punctuation-heavy view of the same data — fewer braces, no quotes around keys, just keys, indents, and dashes. That is what TOON gives you. Paste the Avro JSON into the left panel and the right panel returns the same structure as TOON, with two-space indentation, key: value lines for object fields, and - value lines for array elements.

Both Avro schemas and the JSON encoding of Avro records are JSON underneath, per the Avro 1.11 specification, so the converter accepts either input. The structure stays exactly the same — only the syntax changes. Nested records become indented blocks, arrays of objects become indented dash-prefixed blocks, primitives stay inline. The format is token-oriented in the sense that each line is one logical token: a key, a list element, or a scalar.

Conversion runs in the browser. Nothing leaves the page, nothing is logged.

How to Use Avro to TOON

Three quick steps. The buttons described below are the actual buttons on this page.

1

Paste, Upload, or Load a Sample

Paste an Avro schema or a JSON-encoded Avro record into the left Input panel. Click Upload for an .avsc or .json file, or hit Sample to load the realistic Order schema with nested OrderItem records and a nullable Address. Quick example of what minified Avro input looks like:

{"type":"record","name":"Order","namespace":"com.example.commerce","fields":[{"name":"orderId","type":"string"},{"name":"totalCents","type":"long"}]}

Either .avsc schemas or JSON-encoded records work — both are JSON under the hood, parsed with the browser's native JSON.parse().

2

Read the TOON Output

The right Output panel shows the same data formatted as TOON. Object keys live on their own line, scalars trail with a colon, and arrays of objects use a dash on a new line followed by indented child fields. Two-space indentation throughout — same convention as YAML, which makes TOON visually familiar at a glance.

3

Copy or Download

Hit Copy to grab the TOON for a doc, a chat, or a code review. Hit Download to save as output.toon. The clear button on the input panel resets you to a blank state.

When You'd Actually Use This

Schema Reviews That Read Like Prose

Reading an Avro schema PR with twelve nested records is rough — the braces and quotes pile up. Convert it to TOON and the structure unfolds line by line, easier to follow when you are skimming a diff in a Schema Registry review or a chat thread.

Pasting into Markdown

TOON has no triple-backtick wars with Markdown — no nested quotes, no embedded backticks. Paste it directly into a wiki or README under a code fence and it stays readable without forcing rendering quirks. Fits naturally next to other indent-based snippets like YAML.

Diffing Avro Records

Two JSON-encoded Avro records, you want to know what changed. Convert both to TOON and a line-based diff actually highlights the meaningful changes — instead of every-bracket-moved-by-one-noise that JSON diffs sometimes produce.

Onboarding Material

Walking a new teammate through an Avro-driven pipeline. The first time they see the schema in raw JSON it is intimidating; the same content in TOON looks like an outline. Easier to point at fields, easier to ask questions about.

Common Questions

What is TOON exactly? Is it a real format?

TOON stands for "token-oriented object notation" — a lightweight indent-based syntax used in some tooling chains as an easier-to-read alternative to JSON when the audience is humans, not parsers. Think of it as JSON with the punctuation taken out. There is no central spec; the convention used here is two-space indents, key: value lines, and - value for list items.

How does it compare to YAML?

Visually similar — indent-based, no braces. TOON is a much smaller subset, which is the point: no anchors, no aliases, no flow style, no multi-doc streams. If you want a serialization format with a real spec and parsers in every language, use YAML. If you just want a clean text view of an Avro record, TOON does the job with less to keep track of.

Does it preserve all the data?

Yes, structurally. Strings, numbers, booleans, nulls, arrays, and objects all round-trip from JSON to TOON without losing structure. The output here is a one-way render; we do not provide a TOON parser back to JSON on this page. If you need that, write a small parser tailored to your repo's flavor of TOON.

How are strings with colons or dashes handled?

Plain — they go into the output as-is. TOON does not require quoting because the line structure (one key per line, dashes only at the start of array entries) makes the syntax unambiguous in most cases. If your data routinely contains colons in keys or starts strings with dashes, you may need to post-process the output for your downstream consumer.

Is the data sent to a server?

No. Conversion runs entirely in the browser. JSON.parse() handles the input, a small recursive walker emits the TOON. Nothing is uploaded, nothing is logged.

Can the input also be a JSON-encoded Avro record (not just a schema)?

Yes. Both shapes are JSON, and the converter does not care which one — it just walks the structure and prints it as TOON. Avro schemas and JSON-encoded Avro records are both supported, see the JSON encoding section of the Avro spec for what the record form looks like.

Other Avro and Conversion Tools

Converting to TOON is one piece. These tools handle the rest of the Avro lifecycle: