TOML to JSON Converter

Free TOML to JSON converter. Convert TOML to JSON and JSON back to TOML with a bidirectional toggle. Handles tables, arrays of tables, inline tables, arrays, strings, integers, floats, booleans and datetimes. Runs 100% in your browser, nothing is uploaded.

Paste TOML or JSON and pick a direction.

How toml to json converter works

TOML (Tom's Obvious, Minimal Language) is a configuration file format designed to map unambiguously to a hash table, like JSON. This converter parses your TOML into a JavaScript value and pretty-prints it as indented JSON. It supports tables [a.b], arrays of tables [[name]], inline tables {x = 1}, arrays, strings (basic and literal), integers (with underscores and hex/oct/bin), floats, booleans and datetimes.

Switch the direction to JSON to TOML and the converter serializes a JSON object back into TOML: nested objects become [table] headers, arrays of objects become [[array-of-tables]] headers, and scalars become key = value lines. Strings are emitted as single-quoted literals where possible, falling back to double-quoted basic strings with escaping when needed.

Because TOML's root must be a table, only JSON objects round-trip cleanly (a top-level array or scalar is rejected with a clear message). Everything runs client-side, so your configuration never leaves your browser.

Frequently asked questions

Does it convert JSON back to TOML too?
Yes. Use the Direction toggle to switch between TOML to JSON and JSON to TOML. Both directions share the same parser and serializer so the conversion round-trips cleanly for object roots.
Why is my JSON rejected for JSON to TOML?
TOML's root must be a table (a JSON object). A top-level array or scalar has no TOML representation, so the converter returns a clear error. Wrap it in an object first.
How are datetimes handled?
Datetimes that match the TOML date, time or date-time shapes are kept as strings on the JSON side, since JSON has no native date type, and round-trip back to the same TOML literal.
Is my data uploaded anywhere?
No. All parsing and serialization happen in your browser. Nothing is sent to a server.