TOML ↔ JSON Converter
Convert between TOML and JSON. Tables, arrays of tables, dates. Bidirectional via smol-toml.
published
- [FREE]
- [NO_SIGNUP]
- [NO_UPLOAD]
A TOML ↔ JSON converter parses TOML config files and emits JSON (and the reverse). Useful for porting a pyproject.toml to a CI pipeline that wants JSON, or for previewing how an editor will render your config in a structured viewer.
Privacy
smol-toml (MIT, ~10 KB) is bundled with the page. JSON parsing is native. Your config never leaves your tab.
Frequently asked questions
What is TOML?
Tom's Obvious, Minimal Language — a configuration format designed to be unambiguous and easy to parse. Used by Cargo (`Cargo.toml`), Poetry (`pyproject.toml`), and `.netrc`-style application config.
Can I round-trip TOML → JSON → TOML?
For most data, yes. The two formats are mostly equivalent in expressiveness, but TOML supports typed dates and times that JSON has to serialize as ISO 8601 strings. Round-tripping a date drops its TOML "datetime" type label.
Why does TOML reject some JSON?
TOML requires an object at the root. A bare array (`[1,2,3]`) or scalar (`42`) cannot be represented as a TOML file. The converter rejects those inputs with a clear error.
Is the input uploaded?
No. `smol-toml` parses and stringifies entirely in your browser.