JSON to TOML Converter
Convert a JSON object to TOML in your browser.
Runs in your browser Your input never leaves your device.
Report a problem with this tool
About this tool
Paste a JSON object and get TOML with the same data. Objects become tables, lists of objects become arrays of tables, and strings are quoted and escaped correctly. Two things in JSON have no TOML equivalent, and the tool tells you instead of guessing. TOML has no null: the error names the path of the first null, and you can tick Drop null values to leave nulls out. TOML also needs a table at the top level, so a JSON list or a single value cannot be converted. We verified the output by writing 300 generated JSON documents as TOML, reading them back with Python's tomllib and comparing: the data was identical every time. A JSON string that looks like a date stays a string; TOML dates cannot be recovered from JSON, which has no dates. Everything runs in your browser; nothing is uploaded.
How to use it
- Paste a JSON object.
- Tick Drop null values if it contains nulls.
- Copy the TOML.
Common problems
- It says TOML cannot hold null
- TOML has no null value. Tick Drop null values, or replace the null with something else such as an empty string.
- It says TOML needs an object at the top level
- TOML documents are a set of keys. Wrap a list in an object, for example {"items": [...]}.
- The key order changed
- Plain values come first and tables after them, as TOML requires, so keys can move relative to the JSON.