JSON ⇄ TOML Converter

Convert JSON to TOML and TOML back to JSON, right in your browser

Paste a JSON object to get TOML with tables and arrays of tables, or paste TOML to get indented JSON, then press the swap button to go the other way. Dates and times in TOML become ISO strings in JSON. A mistake in either format is reported with its line and column. Everything runs in your browser: your data is never uploaded, and there is no account to create.

Frequently asked questions

Is my data uploaded anywhere?

No. Converting runs in your browser using JavaScript, so your TOML and JSON are never sent to a remote server and there is no account to create. The page keeps your last input and your settings in your own browser (localStorage) so they survive a reload; nothing is stored anywhere else.

How do I convert in the other direction?

Use the swap button between the two panes. It flips the direction and moves the result into the input, so you can convert JSON to TOML and straight back to check the round trip.

Why does converting my JSON to TOML fail on null?

TOML has no null value. Rather than silently drop the key, the converter stops and names the path of the first null so you can remove it or give it a value. TOML also needs an object at the top level, so a JSON array on its own cannot be converted.

What happens to TOML dates and times?

JSON has no date type, so a TOML date or date-time becomes an ISO 8601 string in the JSON. Converting that JSON back writes it as a plain string, not a TOML date.

Which TOML version is supported?

TOML 1.0. An integer that JavaScript cannot hold exactly is reported as an error instead of being rounded.

Is it safe to paste confidential data, such as configuration files with secrets?

Converting never transmits your text, so a confidential file does not leave your machine. You can verify this: open your browser DevTools, switch to the Network tab, and convert something — no request carries your data. Your last input is saved in your browser's localStorage (clear site data to remove it).

Does it cost anything?

No. The converter is free to use with no sign-up and no usage limits.

Turn JSON into code

More JSON tools