TOML ⇄ JSON
Convert a practical TOML subset to JSON and back, in your browser.
How to use it
- Paste TOML on the left and read JSON on the right, or switch the direction for JSON to TOML.
- Tables become nested JSON objects, arrays of tables become arrays of objects, and inline arrays stay arrays.
- In the reverse direction, nested objects become
[table]sections and arrays of objects become[[array.of.tables]]. - Lines starting with
#and trailing comments are ignored; basic strings keep their escapes. - Copy the result straight into a config file, test fixture or API payload.
Common use cases
- Reading Rust or Python configs — turn a Cargo-style or pyproject-style file into JSON for scripts and tests.
- Generating TOML — build the JSON in code, then convert it to a config file with proper sections.
- Migrating configuration — move settings between tools that expect either format.
- Diffing settings — normalize both sides to JSON before comparing environments.
Why it stays private
Parsing and serialization happen entirely in your browser's memory. Config files often contain hostnames, credentials or infrastructure details, and none of it is uploaded.
FAQ
Q: Which TOML features are supported?
A: Key-value pairs, dotted keys, [table], [a.b] nesting, [[array.of.tables]], basic and literal strings, integers, floats, booleans, inline arrays and comments. Multi-line strings, multi-line arrays and inline tables are outside the subset.
Q: What happens to dates and times? A: They are kept as plain strings, which preserves their text exactly. Type them yourself in the JSON consumer if you need real date objects.
Q: What does JSON to TOML do with null and nested empty objects?
A: TOML has no null, so the conversion stops with a clear error instead of guessing; empty objects are written as empty [table] sections.
Your data stays on this device
TOML ⇄ JSON runs 100% locally. Everything you paste or drop is processed by your own browser and never transmitted. Nothing is stored on our servers — close the tab and it is gone.
Nothing you type is sent to a server, logged, or used for analytics. The page works even with your network disconnected after first load.