TOML ↔ JSON Converter
Convert TOML to JSON and back. Handles nested tables, arrays of tables, inline tables, multi-line strings, and TOML's native datetime types. Useful when moving config between formats — pyproject.toml vs package.json, Cargo.toml vs npm config, etc.
How to use the TOML ↔ JSON Converter
Paste TOML to convert to JSON, or paste JSON to convert to TOML. The TOML parser supports the full TOML 1.0 spec including tables, arrays of tables, inline tables, and dotted keys.
Converting TOML and JSON
TOML is the config format behind Cargo.toml, pyproject.toml, and many Rust and Python tools, chosen for being readable and unambiguous; JSON is what most programs and APIs actually parse. Moving config between the two by hand is fiddly, because TOML has features — tables, arrays of tables, inline tables, and native datetimes — that do not map to JSON one-for-one.
This converts TOML to JSON and JSON back to TOML, supporting the full TOML 1.0 spec including nested and inline tables, arrays of tables, dotted keys, and multi-line strings. When YAML is the other side rather than JSON, the YAML to TOML converter handles that pairing.
Common use cases
- Cargo / pyproject — inspect a Rust or Python config as JSON.
- Migrate config — move settings between TOML and JSON.
- Feed a tool — convert TOML config into JSON a script can read.
- Author TOML — generate TOML from a JSON object.
- Handle tables — convert arrays of tables and inline tables faithfully.