Read a TOML file as JSON, or write JSON as TOML
TOML is the format of Cargo.toml, pyproject.toml and many other configuration files: easy to read, strict about types. JSON is what most tools and APIs expect. Paste either one and the other appears, so you can inspect a configuration as data, feed it to a script or draft a TOML file from a JSON example.
Convert in four steps
- Choose TOML → JSON or JSON → TOML.
- Paste your text into the left box. A small project file is there as an example.
- Pick the JSON indentation if you are converting to JSON.
- Read, copy or download the result. A syntax error shows the line and column and a short explanation.
How TOML maps to JSON
- Tables such as
[server]become nested objects, and dotted keys likea.b = 1do too. - An array of tables, written
[[plugins]], becomes an array of objects. - Inline tables and arrays map one to one. Strings, integers, floats and booleans keep their type.
- Dates and times, which JSON does not have, become text such as
"2026-10-18". - Integers too large for JSON to hold exactly are written as text, and the status line tells you.
Limits of the other direction
A TOML document is always a table, so the JSON needs an object at the top level. TOML has no null, which means null values are left out and the tool reports how many. Comments cannot be kept in either direction, because JSON has none and the JSON-to-TOML result is generated from data, not from your original file.
Typical uses
- Reading a
Cargo.tomlorpyproject.tomlas data in a script. - Comparing a TOML configuration with its JSON or YAML twin.
- Checking a TOML file for typos before committing it.
- Turning a JSON example from documentation into a starting TOML file.
Config files stay on your machine
Parsing runs in your browser. A configuration file may hold hostnames or tokens, and nothing you paste is uploaded.