🧷 JSON to TOML Converter
Paste JSON and get equivalent TOML for a config file — serialised locally, nothing uploaded.
serialized with @iarna/toml
How the json to toml converter works
The tool parses your JSON and serialises it as TOML with the @iarna/toml writer: top-level objects become tables, nested objects become sub-tables, and arrays are written as TOML arrays. The JSON must be an object at the top level, because a TOML document is always a set of key/value pairs.
TOML is easier for people to read and edit than JSON for configuration, which is why tools are adopting it. Note that TOML has no null value and every key needs a value, so JSON containing null (or a top-level array or string) can't be represented — the tool tells you when that happens. It runs entirely in your browser.
Frequently asked questions
How do I convert JSON to TOML?
Paste a JSON object or load a .json file and the tool outputs TOML you can copy or download. Objects become tables and arrays become TOML arrays.
Why must the JSON be an object?
A TOML document is a collection of key/value pairs, so it needs an object at the top level. A top-level array, string or number has no TOML representation.
What about null values?
TOML has no null and requires every key to have a value, so JSON with null can't be converted. Remove or replace null values first; the tool flags this.
Is my JSON uploaded?
No — the conversion runs locally in your browser and nothing is transmitted.