UTILS.
100% in-browser
T⇄

TOML ⇄ JSON Converter

Convert TOML config files to JSON and JSON back to TOML with clear syntax error reporting.

— output appears here —

About this tool

Convert TOML to JSON or JSON back to TOML instantly as you type — handy for inspecting Cargo.toml, pyproject.toml, netlify.toml and other modern config files, or for generating them from JSON data. Pick the direction, choose the JSON indentation (2 or 4 spaces, or minified), and use the swap button to feed the output back in and flip the direction.

The full TOML 1.0 syntax is supported: nested tables become nested JSON objects, [[arrays of tables]] become JSON arrays of objects, and TOML date-time values are emitted as ISO 8601 strings in the JSON output. Syntax errors are reported with the parser's message, including the offending line and a caret pointing at the exact position, so the tool doubles as a quick TOML validator.

Everything runs in your browser with an open-source TOML parser — your config files, which often contain registry tokens, connection strings and other secrets, are never uploaded anywhere. No account, no server, and it keeps working offline.

Frequently asked questions

How are TOML arrays of tables converted?
Each [[name]] block becomes one object inside a JSON array called name, and converting back turns a JSON array of objects into [[name]] blocks again — the standard TOML 1.0 mapping.
What happens to TOML dates and times?
TOML has native date-time values; converting to JSON emits them as ISO 8601 strings, since JSON has no date type. Converting such a string back to TOML keeps it as a quoted string rather than a bare date-time.
Why can't my JSON be converted to TOML?
A TOML document is always a table, so the top level of your JSON must be an object — a bare array, string or number cannot be represented. TOML also has no null, so null values are dropped from the output.
Is my config file uploaded to a server?
No. Parsing and conversion run entirely in your browser with the open-source smol-toml library — your file never leaves your device, so tokens and credentials inside your configs stay private.

More tools