Free JSON to TOML Converter — Convert JSON to TOML Online
TOML is the config format behind Cargo, Hugo, and countless app settings files — but most data starts life as JSON. Paste JSON here and get clean TOML: nested objects become [tables], arrays of objects become [[arrays of tables]], and plain arrays stay inline. The serializer is hand-written in your browser, and it is honest about its limits: TOML has no null, no nested arrays, and no mixed-type arrays, so those inputs produce a clear error instead of silently wrong output. Exotic JSON values like dates-as-strings stay strings — TOML datetimes are not inferred.
JSON to TOML Converter
Paste JSON, get clean TOML config — tables, arrays of tables, honest errors for unsupported types.
1 Paste your JSON
2 Output settings
3 Generate & copy
⚙️ Generated TOML
How it works
Paste valid JSON and the converter walks it with a hand-written TOML serializer: scalar keys stay at the top, nested objects become [table] sections, and arrays of objects become [[arrays of tables]]. Plain arrays of strings, numbers, or booleans stay inline. In compact mode, nested objects become inline tables instead. Types TOML cannot express — null, nested arrays, mixed-type arrays, non-finite numbers — stop the conversion with a plain error naming the path, so you never get silently wrong config.
Everyday uses
- Hugo and Cargo configs — turn a JSON sketch into a real .toml file.
- App settings — convert API-style JSON into the config format your tool expects.
- Migrating configs — move a project from JSON config to TOML without hand-rewriting.
- Learning TOML — paste familiar JSON and see exactly how tables and arrays map.
- Sharing configs — produce clean, commented TOML to paste into docs or PRs.
Plain note: JSON strings that look like dates stay strings — this converter never guesses that a string is a TOML datetime.