JSON to TOML converter
JSON in, valid TOML out — for Cargo, pyproject and app configs.
Convert JSON to TOML for config files
TOML is the configuration format of Cargo.toml, pyproject.toml, Hugo, Netlify and many CLI tools. Converting JSON to TOML is typically a migration: a settings object that started life as JSON and now belongs in a human-edited config. The conversion runs entirely in your browser.
How JSON structures map to TOML
- Top-level keys become
key = valuelines. - Nested objects become tables:
{"server": {"port": 8080}}is written as a[server]section withport = 8080under it. - Arrays of objects become arrays of tables, one
[[name]]block per element.
Two JSON shapes cannot be expressed in TOML at all, and the converter says so rather than guessing. The document must be an object at the top level — a bare array or a single value has no TOML form — and TOML has no null, so remove null values or replace them with a real default first.
Other conversions with this tool
How to convert JSON to TOML
- 1
Paste a JSON object into the left pane.
- 2
TOML tables appear live on the right.
- 3
Copy the result into your config file.
JSON to TOML — frequently asked questions
Is my JSON uploaded anywhere?
No. The conversion runs in your browser, and this site has no server that could receive your JSON. A Content-Security-Policy blocks requests to other domains; you can confirm in DevTools → Network or by going offline.
Why does my JSON fail to convert to TOML?
TOML needs an object at the top level and has no null. A JSON document that is a bare array, or that contains null values, cannot be represented in TOML.
How are nested objects written?
As TOML tables: a nested object under "server" becomes a [server] section, and an array of objects becomes [[array]] tables.