JSON to TOML converter
Convert JSON to TOML 1.0 for Cargo.toml, pyproject.toml and other config files: nested objects become [tables], arrays of objects become [[arrays of tables]], and strings are escaped for you.
Waiting for input
What you get
- Convert JSON to TOML 1.0 online for Cargo.toml, pyproject.toml and other config files, with [tables] and [[arrays of tables]].
- Checked: the TOML is parsed back with an independent TOML parser and compared with your JSON, value by value.
- TOML has no null, so null values are named in the result instead of disappearing silently.
- Private and free: everything runs in your browser, nothing is uploaded, and there is no sign-up.
How each result is checked
- Your input is parsed with a strict, standards-compliant parser.
- The TOML output is parsed back with an independent TOML parser.
- The parsed-back data is compared with your original, value by value. Any difference is reported with its exact path.
What can't convert exactly
- TOML has no null, so null values are left out (with a warning).
- A TOML file must be a table, so a top-level array is placed under a key you choose.
- Numbers are written by value: 1.0 becomes 1 (a TOML integer) and -0.0 becomes 0. The result names any number whose written form changes.
Questions
Does it produce [[array]] tables?
Yes. Arrays of objects become arrays of tables.
How do I convert JSON to TOML online?
Paste your JSON or open a file on the left (or click Example). The TOML appears on the right as you type, already checked. Copy it, or download it as a file. Nothing is uploaded.
Can the TOML output be wrong?
Every result is checked before it is shown (the checks are listed on this page). If a check fails, the page says "Review needed" and why, instead of presenting the output as correct, and anything that cannot convert exactly is named in the notes.