JSON to TOML Converter Online — Free
Runs 100% in your browser — your files never leave your device.
TOML reads better than JSON for human-edited config, and tools like Cargo and Hugo expect it. Paste JSON (comments and trailing commas allowed) and get TOML with proper tables and typed values out. Nested objects become TOML tables automatically; anything TOML cannot express is flagged.
How it works
- 1
Paste your JSON
Lenient parsing accepts comments and trailing commas.
- 2
Read the TOML
The output updates live as you type.
- 3
Copy the result
One click copies the TOML into your config file.
About this tool
How the conversion works
The tool parses your JSON and re-renders it as TOML: objects become tables and sub-tables, arrays of primitives become TOML arrays, and scalars carry their JSON types. The output is valid TOML ready for Cargo, pyproject, or any TOML-based config.
Structure flattens into headers
JSON nests freely; TOML expresses nesting through table headers. A deeply nested JSON object converts into [path.to.section] headers — same data, different geometry. Ragged objects (siblings with different key sets) may need a check, since TOML tables are strictly hierarchical.
The JSON-to-TOML use case
API output becoming configuration, generated data becoming hand-editable config, or a one-time migration from a JSON config file into a TOML-based tool. One paste, one conversion, no manual translation of every field.
Frequently asked questions
Can any JSON become valid TOML?
Nearly — deeply ragged structures where sibling objects have wildly different shapes can produce awkward table layouts. Simplify extreme cases first and the conversion is clean.
What happens to null values?
TOML has no null type — nulls are skipped or flagged, depending on the position. Remove nulls from the JSON before converting for the cleanest output.
Do empty objects and arrays convert?
Yes — empty objects become empty table headers and empty arrays become empty TOML arrays, both valid.