Input

Output

What does Avro to TOML do?

You have an Apache Avro schema (.avsc) or a JSON-encoded Avro record, and the team you are handing it to lives in TOML-land — config files, infrastructure repos, Cargo manifests, anything where the format of choice is TOML. Paste the Avro JSON into the left panel, and the right panel returns the same data laid out as TOML, with sub-tables for nested records and arrays of tables for arrays of objects.

Both Avro schemas and the JSON encoding of Avro records are JSON underneath, per the Avro 1.11 specification, so the converter takes either. Object keys become TOML keys. Nested objects become [table] headers. Arrays of objects become [[array.of.tables]]. Primitive arrays stay inline. Strings get safe double-quoting so embedded quotes and backslashes survive intact.

Everything happens in your browser. No upload, no server round-trip, no schema stored anywhere.

How to Use Avro to TOML

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 looks like:

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

TOML requires an object at the top level — a JSON array or scalar will not convert cleanly, since TOML has no notion of a bare top-level array.

2

Read the TOML Output

The right Output panel shows the same data formatted as TOML. Top-level primitive fields come first, then sub-tables for nested records, then arrays of tables for any list of objects. Sub-table headers like [fields.items] use the dotted-key style from the spec so paths are unambiguous.

3

Copy or Download

Hit Copy to grab the TOML for a config repo, a Cargo manifest, or a chat. Hit Download to save as output.toml. The clear button on the input panel resets you to a blank state. Conversion uses the browser's native JSON.parse() — your data never leaves the page.

When You'd Actually Use This

Config File Migration

You inherited an Avro schema that someone is using as a configuration shape (yes, it happens). The new home is a Rust project with Cargo and TOML everywhere. Run the schema through here, drop the TOML into the repo, prune what does not apply.

Documentation in TOML Repos

Your infra repo speaks TOML — Pulumi configs, Terragrunt overrides, custom tooling. You need to document an event payload coming off a Kafka topic with a known Avro schema. Convert once, paste the TOML into the README as the example payload.

Generating Test Settings

You wrote an Avro-driven settings system and need TOML fixtures for a Rust integration test. Paste the JSON-encoded Avro record into the converter, drop the TOML into <code>tests/fixtures/settings.toml</code>, point the test at it.

Sharing Avro with TOML-Native Teams

You are explaining a data shape to a team that does not speak Avro fluently but reads TOML every day. TOML's sub-table headers make the nesting visually obvious, which is often a faster on-ramp than handing them a JSON wall.

Common Questions

Will the round-trip preserve all the data?

Mostly yes. TOML has fewer types than JSON — there is no null, for instance, so nulls are written as empty strings. If you need lossless round-tripping, JSON or Avro itself is the safer carrier; TOML is great for human-edited configs but not designed as a serialization format for arbitrary data.

How are mixed-type arrays handled?

TOML arrays must be homogeneous, and the converter does not enforce that — it emits whatever was in the JSON. If you have something exotic like [1, "two", true], the resulting TOML may not parse in a strict TOML reader. Avro schemas almost never produce such arrays, so this is rarely an issue in practice.

What does an Avro union look like in TOML?

An Avro union in JSON is encoded as either a bare value (for the resolved branch) or {"type": value}. The converter treats those exactly as the JSON shows them — TOML cannot represent the union type itself, only whichever branch was resolved at the time of encoding. See the unions section of the spec.

Is the data sent to a server?

No. Conversion runs entirely in your browser using JSON.parse() and a small recursive walker. Nothing is uploaded, nothing is logged.

Why does my key look weird in the TOML output?

Keys with special characters or spaces get JSON-quoted, which produces "weird key" = "value". That is valid TOML — see the keys section of the TOML 1.0 spec. If you want bare keys, the source field names need to be plain identifiers (alphanumerics + underscore + dash).

Can I go from TOML back to Avro?

Not from this page. There is no reliable Avro-from-TOML inference (you would have to know the original Avro types). If you need a JSON form to feed into the JSON to Avro tool, parse the TOML in your script first and emit JSON, then paste that.

Other Avro and TOML Tools

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