JSON ↔ TOML Converter
Convert JSON to TOML and TOML to JSON instantly in your browser.
Converted TOML will appear here.
About the JSON ↔ TOML Converter
This JSON to TOML converter turns JSON into clean TOML and converts TOML back into indented JSON, both directions on the same page. Pick a direction, paste your document, and the result updates as you type. It is handy when a config file is written in one format but a tool or runtime expects the other.
TOML and JSON describe the same kinds of data: tables, arrays, strings, numbers, booleans, and dates. TOML is common in Rust (Cargo.toml), Python (pyproject.toml), and Hugo site configs because it reads well by hand. JSON is stricter and more universal, so it is often what APIs and programs produce. Converting between them lets you keep the format you prefer for editing while still meeting whatever a given system requires.
The converter parses your input fully, so it catches real problems rather than guessing. If a TOML table is redefined, a JSON value is missing a comma, or a key type is inconsistent, you get a calm inline message that points at the issue instead of a broken result. Fix the input and the output reappears immediately.
Everything runs in your browser. Your JSON or TOML is parsed and converted locally using JavaScript on this page, and nothing you paste is uploaded, logged, or sent to any server. You can use it on private configuration and secrets without anything leaving your machine.
Reach developers and designers who use these tools every day. Privacy-first, no trackers.
Frequently asked questions
How do I convert JSON to TOML?
Choose the "JSON to TOML" direction, paste or type your JSON into the input panel, and the TOML output appears below as you type. Use the copy button to grab the result.
Can it convert TOML back into JSON?
Yes. Switch the direction select to "TOML to JSON" and paste valid TOML. The tool produces equivalent JSON with standard indentation that you can copy or paste into an API or config file.
Why am I seeing an error message?
The input could not be parsed. Common causes are a duplicate table key in TOML, a trailing comma or missing quote in JSON, or a value type that does not map cleanly between formats. The message describes the problem so you can correct that spot and the output returns.
Is my data uploaded or stored anywhere?
No. The conversion happens entirely in your browser with local JavaScript. Nothing you paste is sent to a server, saved, or logged, so it is safe to use with private or sensitive configuration.
Does it support dates and inline tables?
Yes. TOML native dates and inline tables are parsed and converted to their JSON equivalents. Very large documents may take a moment to convert, but everything still runs locally in your browser.