TOML to JSON Converter & Validator
Transform text and structured data locally in your browser.
Transform text and structured data locally in your browser.
Pick an action, paste your file and click Convert:
[table] headers for objects and [[array]] headers for lists of objects.TOML is the configuration format of pyproject.toml, Cargo (Cargo.toml), Hugo, Netlify, Poetry, uv, Ruff, Black and many other tools, so converting to JSON is a quick way to inspect a config, diff it, or feed it to a script that only reads JSON.
{ "title": "Example", "port": 8080, "debug": false,
"owner": { "name": "Ada", "dob": "1815-12-10" },
"servers": [ { "ip": "10.0.0.1", "roles": ["web"] }, { "ip": "10.0.0.2" } ] }
becomes
title = "Example"
port = 8080
debug = false
[owner]
name = "Ada"
dob = "1815-12-10"
[[servers]]
ip = "10.0.0.1"
roles = ["web"]
[[servers]]
ip = "10.0.0.2"
TOML has no null, so JSON keys whose value is null are left out and listed in a note under the output. Keys that are not bare words (spaces, dots, Unicode) are quoted automatically.
| TOML | JSON |
|---|---|
[server] table | Nested object "server": { ... } |
[[products]] array of tables | Array of objects |
a.b.c = 1 dotted key | {"a": {"b": {"c": 1}}} |
Integers, floats, inf, nan | Numbers (inf/nan become null, as JSON has no such values) |
Offset date-time 1979-05-27T07:32:00Z | ISO 8601 string |
| Multi-line and literal strings | Ordinary JSON strings with escapes |
[table] header twice.name = Ada must be name = "Ada".a = 1 followed by [a].{ x = 1, } is not allowed in TOML 1.0.path = 'C:\Users\ada'.TOML is explicit like JSON (no indentation rules, no type guessing) but allows comments and is easier to edit by hand. YAML is more compact for deep nesting, and JSON is best for machine-to-machine data. Use JSON to YAML if you need YAML instead.
No. JSON has no comments, so they are dropped when converting TOML to JSON, and JSON to TOML output has none to keep.
No. The TOML parser library is downloaded once from a CDN, then parsing and conversion run in your browser.