TOML to JSON Converter & Validator

Transform text and structured data locally in your browser.

Three TOML tools in one

Pick an action, paste your file and click Convert:

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.

Example: JSON to TOML

{ "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.

How TOML maps to JSON

TOMLJSON
[server] tableNested object "server": { ... }
[[products]] array of tablesArray of objects
a.b.c = 1 dotted key{"a": {"b": {"c": 1}}}
Integers, floats, inf, nanNumbers (inf/nan become null, as JSON has no such values)
Offset date-time 1979-05-27T07:32:00ZISO 8601 string
Multi-line and literal stringsOrdinary JSON strings with escapes

Common TOML errors the validator catches

FAQ

Is TOML better than YAML or JSON for config?

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.

Are comments kept when converting?

No. JSON has no comments, so they are dropped when converting TOML to JSON, and JSON to TOML output has none to keep.

Is my file uploaded?

No. The TOML parser library is downloaded once from a CDN, then parsing and conversion run in your browser.