TOML to JSON Converter
Convert TOML to JSON: tables become objects, arrays of tables become arrays and dates become ISO strings. Full TOML 1.0 support with clear error messages.
Runs in your browser. What you enter is kept for 30 days to improve Toolgrid, then deleted.
How to use the TOML to JSON Converter
- 1 Paste your TOML, such as a Cargo.toml, pyproject.toml or config file.
- 2 Choose the indentation.
- 3 Copy the JSON or download it.
About the TOML to JSON Converter
TOML (Tom's Obvious Minimal Language) is a configuration format used by Rust (Cargo.toml), Python (pyproject.toml), Hugo, Netlify and many other tools. It is designed to be easy to read and to map unambiguously to a hash table, which makes converting it to JSON straightforward.
Tables ([server]) become nested objects, dotted keys (server.port = 80) become nested properties, inline tables become objects and arrays of tables ([[workers]]) become arrays of objects. Strings, integers, floats and booleans keep their types.
TOML has date and time types that JSON lacks; offset date-times, local date-times, dates and times are written as ISO 8601 strings. The converter uses smol-toml, a spec-compliant TOML 1.0 parser, so it rejects invalid TOML such as duplicate keys or redefined tables with a precise error message.
Frequently asked questions
What happens to comments?
They are dropped, because JSON has no comments.
How are TOML dates converted?
As ISO 8601 strings, for example 2026-11-30T09:30:00.000Z. Local dates and times without an offset are written as they are.
Why do I get a "duplicate key" error?
TOML doesn't allow defining the same key or table twice. Merge the two definitions into one.
Are very large integers supported?
TOML integers are 64-bit, but the conversion runs in JavaScript, where integers are exact only up to about 9 × 10^15. Larger values can lose their last digits; keep such IDs as strings in TOML.