Data & Format / JSON Tools
JSON to TOML Converter
JSON to TOML converts between JSON and TOML, the two configuration formats, and is explicit about the one case neither handles the same way: TOML has no null, so a JSON null must be omitted, rejected or turned into an empty string by a choice you control. Nothing is uploaded.
This space is reserved for a sponsor. Every tool on this site stays free and runs locally in your browser.
This space is reserved for a sponsor. Every tool on this site stays free and runs locally in your browser.
How to use
- 1
Paste JSON or TOML
Drop in a JSON document or a TOML file. The converter detects which you provided and produces the other format immediately, so you can move a config between the two representations without rewriting it by hand.
- 2
Convert and read the output
JSON objects become TOML tables, arrays become TOML arrays, and native TOML types such as datetimes are preserved where JSON has an equivalent. The output is formatted for humans to read, with tables and keys in a sensible order.
- 3
Choose how null is handled
Because TOML has no null type, a JSON null cannot be represented directly. Pick the behaviour you want: omit the key, treat null as an error, or write an empty string. The choice matters, because a silent substitution can hide a missing value that downstream code expected to see.
- 4
Copy the result
Copy the converted text to your clipboard. No request leaves your browser and nothing is stored; the transformation runs entirely on the page.
Key facts
- No nullTOML defines no null type, so a JSON null has no direct representation and must be omitted, rejected or substituted by an explicit choice.Source:TOML spec
- Native typesTOML has native string, integer, float, boolean, datetime and array types, plus tables; JSON has string, number, boolean, array, object and null.Source:TOML / JSON specs
- Key orderTOML preserves the order keys are written, and JSON objects preserve insertion order in practice, so ordering is generally maintained across a round trip.Source:Both specs
- OriginTOML was created at GitHub for configuration files that are easy for humans to read and write, which is why it favours explicit, typed values.Source:TOML introduction
Frequently asked questions
How is a JSON null handled, since TOML has no null?
TOML simply has no null type, so there is no faithful way to carry a JSON null across. This tool gives you the choice instead of deciding silently: omit the key entirely (cleanest TOML, but the field disappears), reject the conversion with an error (safe, but stops on the first null), or write an empty string (keeps the key, but a string is not a missing value). None of the three is universally right, which is exactly why the decision should be yours and visible.
How are arrays of tables and nested objects handled?
A JSON object becomes a TOML table, and a JSON array of objects becomes TOML array-of-tables syntax using double brackets, [[items]]. Deeper nesting becomes sub-tables. The structure is preserved round-trip for the common cases, though TOML and JSON differ on a few edge details such as key ordering guarantees and how unambiguously a type is fixed.
What about dates, times and floats?
TOML has first-class date, time and datetime types, and JSON has none — dates are usually written as strings. When converting TOML to JSON, a TOML datetime becomes a JSON string unless you specifically want it parsed. Floats survive directly; integers stay integers. Being explicit about which values are really instants in time prevents them being treated as opaque strings on the JSON side.
Is my data uploaded?
No. Conversion runs entirely in your browser; the JSON or TOML you paste is never sent to or stored on any server. You can convert real configuration files, including anything sensitive such as credentials or internal paths, without it leaving the page — the transform happens in your tab and nowhere else.
Related tools
JSON Formatter
Paste JSON to pretty-print it with consistent indentation, minify it to one line, or find the exact line and column of a syntax error. Runs locally.
JSON to YAML
Convert JSON to YAML and YAML to JSON in your browser, with a clear note on what the round trip loses: comments, anchors, multiple documents and key order.
JSON to CSV
Convert JSON to CSV with a documented rule for flattening nested objects and arrays, plus a round-trip check that shows what the reverse conversion loses.
This space is reserved for a sponsor. Every tool on this site stays free and runs locally in your browser.