TOML to JSON Converter

Convert TOML to JSON online – Cargo.toml, pyproject.toml and config files – with dates, tables and arrays of tables handled correctly.

Converter

Was this tool useful?

About this tool

About TOML to JSON Converter

Paste a TOML file and get the same data as JSON. Tables, inline tables, arrays of tables ([[products]]), dotted keys, multi-line strings and all four kinds of TOML dates and times are supported (TOML 1.0). Errors show the line and column where the file is wrong.

How it works

Parsed with smol-toml (TOML 1.0.0). Dates become ISO 8601 text: offset date-times keep “Z”, local dates become YYYY-MM-DD.

Example

[[products]] blocks become a JSON array called products, with one object per block.

How to use this tool

  1. Paste the TOML text.
  2. Choose the indent.
  3. Copy or download the JSON.

Frequently asked questions

Can I convert JSON back to TOML?

Not with this tool. TOML cannot hold everything JSON can (for example null or mixed arrays), so a reverse conversion is not always possible.

Does the TOML to JSON Converter send my data to a server?

No. The TOML to JSON Converter runs entirely in your browser using JavaScript, so tokens, code and data you paste stay on your device. You can even use it offline once the page has loaded.