TOML to JSON

Convert TOML to pretty-printed JSON locally. Dates become strings, and inf/nan become null with a warning.

Parsing and conversion on this page run in your browser.

All templates
  • Some types cannot convert without loss: JSON cannot tell a date string from any other string; comments are dropped after parsing; integers outside the safe range are kept as strings.
  • Offset, local date, local time, and local datetime values are all JSON strings.

FAQ

Is the JSON strict?

Yes. It can be parsed with JSON.parse. Trailing commas are not emitted.

What happens to large integers?

Integers outside Number.MAX_SAFE_INTEGER are decimal strings, and the page says precision was preserved that way.

Related tools