Paste any JSON object and get clean, readable TOML output instantly. Nested objects become TOML tables, arrays stay arrays, and all scalar types map correctly.
TOML (Tom's Obvious Minimal Language) is a configuration file format designed to be easy to read. It maps cleanly to JSON but uses a different syntax.
Input JSON:
{
"server": {
"host": "localhost",
"port": 8080,
"debug": true
},
"features": ["auth", "logging"],
"timeout": 30.5
}
Output TOML:
timeout = 30.5
features = [ "auth", "logging" ]
[server]
host = "localhost"
port = 8080
debug = true
Key mappings:
[ ]TOML is the configuration format of choice for several major ecosystems. Rust projects use Cargo.toml for package metadata and dependencies. Python packaging uses pyproject.toml (PEP 518). Hugo static site generator uses TOML for its config. Many CLI tools and system daemons prefer TOML for its human readability.
JSON is better for data exchange — APIs, databases, SDKs. TOML is better for configuration files that humans write and maintain. Unlike JSON, TOML supports comments and has a much more readable syntax for nested configuration. Unlike YAML, it has no indentation-sensitivity or implicit type coercion surprises.
TOML has one significant constraint: the root must be an object (table), not an array or a scalar. If your JSON is a root-level array like [1, 2, 3], wrap it in an object first: { "items": [1, 2, 3] }.
Arrays of mixed types are not valid in TOML — every element must be the same type. If your JSON array mixes strings and numbers, the converter will error. Clean up the array type before converting.
TOML dates (1979-05-27T07:32:00Z) are a distinct native type. JSON date strings are converted as plain strings — they won't be recognised as TOML datetime values unless the format matches the RFC 3339 spec exactly.
TOML requires a root object (table). A root-level array has no TOML equivalent. Wrap it in an object first: { "items": [...] }.
Nested objects become TOML table headers — [section] for single nesting, [parent.child] for deeper nesting. Arrays of objects become [[array of tables]] with double brackets.
Yes — TOML supports # comments, but they can only be added manually after conversion. JSON has no comment syntax, so there is nothing to carry over from the input.
Both are human-readable config formats. TOML is stricter and simpler — no indentation sensitivity, explicit types, no implicit boolean coercion (yes/no/on/off). YAML is more expressive but has more edge cases. TOML is preferred in the Rust, Python packaging, and Hugo ecosystems; YAML dominates in Kubernetes, GitHub Actions, and Ansible.
Yes — use the TOML to JSON converter to go the other direction.
No. Conversion runs in your browser using the @iarna/toml library. Nothing is transmitted.
More Tools