TOML 1.0 · smol-toml

TOML ⇄ JSON converter

Convert either way with a real TOML parser, and get a line number when the file is wrong instead of a guess.

0 characters

Conversion runs in this tab. Config files often carry registry tokens, so nothing is uploaded or stored.

Short answer: paste the file, pick a direction. Errors come back with the line and column the parser stopped at, and lossy conversions are refused instead of applied.

The three places TOML and JSON disagree

Round-tripping

A TOML file without dates or comments survives JSON → TOML → JSON unchanged. Comments are the first casualty, because JSON cannot represent them; if a comment matters, keep the original file and use this page to inspect rather than to rewrite.

Checking the converted JSON against a contract? TheJSON Schema validator reports the exact path that fails.

TOML questions

How are TOML dates represented in JSON?

As ISO 8601 strings. JSON has no date type, so a TOML offset date-time becomes "2026-10-21T10:00:00Z" — the only lossless spelling. The reverse direction cannot know to turn that string back into a date, and does not pretend to.

Why does JSON to TOML sometimes fail?

Because TOML is not a superset of JSON. It has no null, and arrays must be homogeneous — mixing a string and a number in one array is not expressible. Rather than dropping the offending key, the converter stops and names the path, because a silently missing setting is the worst possible output.

Which TOML version is supported?

TOML 1.0, through the smol-toml parser. That means dotted keys, arrays of tables, inline tables and multi-line strings all work. Comments are not preserved on the way back, because JSON has no way to carry them.

Is my configuration uploaded?

No. Parsing and serialising happen in this tab. A Cargo.toml or a pyproject.toml can contain registry tokens, so nothing is sent anywhere.

Related tools