JSON to TOML Converter
Paste a JSON object and get TOML — scalars, [tables] and [[arrays of tables]] laid out correctly, live in your browser.
This json to toml converter rewrites a JSON object as a TOML config as you type. Plain key/value pairs come first, nested objects become [table] sections, and an array of objects becomes a repeated [[table]] block — with scalar keys always emitted before their subtables so every value lands where TOML expects it. Arrays of numbers or strings render as inline arrays, and strings are quoted and escaped for you. Use it to convert json to toml for a Cargo, Hugo, or pyproject-style file without hand-formatting the sections.
How it works
- 1
Paste a JSON object
Put a JSON object in the left pane. TOML needs an object at the top level, not a bare array or value.
- 2
Read the TOML
The right pane lays out tables and arrays of tables live, keeping key/value pairs above their subtables.
- 3
Copy or download
Copy the result or save it as a config.toml file.
Instant & 100% private — nothing is uploaded
Everything runs locally in your browser. Your code, text and files are processed on your own device and are never sent to a server — so there are no upload waits, no size limits from us, and nothing is ever stored or logged.
Frequently asked questions
- Why does the top level have to be an object?
- A TOML document is a table of key/value pairs, so it needs named keys at the root. A bare array or scalar has no keys to map, so this json toml converter asks for an object.
- How are nested objects and lists of objects handled?
- A nested object becomes a [table] header, and an array of objects becomes repeated [[table]] blocks — the array-of-tables form TOML uses for lists of records.
- What happens to null values?
- TOML has no null type, so a null is written as an empty string ("") to keep the output valid. Remove or fill those keys if empty strings aren’t what you want.
- How are keys and strings quoted?
- Bare keys are used where allowed; keys with spaces or symbols are quoted. String values are double-quoted with the standard escapes for quotes, backslashes and newlines.
- Does my data get uploaded?
- No. The conversion runs in your browser, so the JSON you paste stays on your machine.
More tools
More from the Hivly network
Free sister tools on our other sites.