What it does
This tool converts TOML to JSON and JSON back to TOML. TOML is the configuration format behind Rust’s Cargo.toml, Python’s pyproject.toml, Hugo, Netlify, Deno and many other tools. It is easy for people to edit, but most scripts, APIs and validators expect JSON. Converting lets you inspect a config with JSON tools, feed it to a program, or turn JSON data into a tidy config file.
How to use
- Paste TOML into the input box, drop a
.tomlfile on it, or press Sample. - The JSON appears as you type. Choose 2 or 4 spaces of indentation.
- Switch Direction to JSON → TOML to convert the other way. The JSON must be an object at the top level, because a TOML document is always a table.
- Copy or download the result.
If the TOML has a mistake, the error shows the line and column, and clicking it jumps to the spot. Common mistakes are a missing closing quote, defining the same key or table twice, and putting a bare string without quotes on the right of =.
Example
TOML input:
[server]
host = "0.0.0.0"
port = 8080
[[users]]
name = "Alice"
roles = ["admin", "editor"]
JSON output:
{
"server": { "host": "0.0.0.0", "port": 8080 },
"users": [{ "name": "Alice", "roles": ["admin", "editor"] }]
}
[server] becomes a nested object and each [[users]] block adds one element to the users array.
Type mapping
- Strings, integers, floats and booleans map directly. Large integers beyond JavaScript’s safe range lose precision, so keep IDs as strings.
- Arrays map to arrays, and tables and inline tables map to objects.
- Offset date-times, local date-times, local dates and local times become ISO 8601 strings.
- In the other direction,
nullhas no TOML equivalent and is reported as an error with its path. Nested objects become[table]sections and arrays of objects become[[array]]sections.
FAQ
› Is my TOML file uploaded?
No. Parsing and conversion run entirely in your browser, so Cargo manifests, pyproject files and configs with secrets never leave your device.
› Which TOML version is supported?
TOML 1.0, including tables, arrays of tables, inline tables, multi-line strings, dates and times, and hexadecimal, octal and binary integers.
› How are TOML dates converted to JSON?
JSON has no date type, so dates and times become ISO 8601 strings. For example 2026-10-08 stays "2026-10-08" and 1979-05-27T07:32:00Z becomes "1979-05-27T07:32:00.000Z".
› Why does JSON to TOML fail on null?
TOML has no null value. The tool stops and tells you the path of the first null, such as database.password, so you can remove the key or give it a value.
› Are comments kept?
No. Comments in TOML are dropped because JSON cannot hold them, and JSON has no comments to carry over to TOML.