TOML to JSON
Convert TOML to JSON.
About the TOML to JSON
Turns a TOML file into JSON: a [table] becomes a nested object, a [[table]] becomes an array of objects, and dotted keys nest the same way they do in TOML. Handy for reading Cargo.toml, pyproject.toml, or a tool config from a script that only parses JSON. Choose an indent, press Convert, then copy or download the result. Parsing happens in your browser.
How to use the TOML to JSON
- Paste your TOML into the TOML panel, or press Sample to load an example.
- Choose an Indent of 2 or 4 spaces for the JSON output.
- Press Convert.
- Press Copy, or Download to save converted.json.
Frequently asked questions
- What happens to TOML dates and times?
- JSON has no date type, so they become strings. An offset date-time such as 1979-05-27T07:32:00Z is emitted as "1979-05-27T07:32:00.000Z", and a local date stays "1979-05-27".
- Why does a very large integer fail to convert?
- TOML integers are 64-bit, and a JavaScript number cannot hold every 64-bit value exactly. Rather than silently rounding, the parser rejects an integer it cannot represent losslessly and tells you which line it is on.
- Can it convert JSON back to TOML?
- Not here — this tool runs one direction only. For a round trip between config formats, the YAML ⇄ JSON converter handles both directions.
- Where do the errors point?
- At the offending line and column, with the reason — an unfinished array or an unexpected character, for instance — shown under the input panel.
- Is my config file uploaded?
- No. Config files carry registry tokens and internal package names often enough that this matters: the parse runs in your browser and nothing is transmitted.