JSON ⇄ TOML Converter

Convert JSON to TOML and TOML back to JSON, both directions, with clear error messages — 100% in your browser, no upload.

Output
title = "MakerBox"
tags = [ "free", "private" ]

[owner]
name = "you"

🔒 Converted in your browser — nothing is uploaded.

Convert both directions

Paste JSON to get clean TOML, or switch direction to turn TOML into pretty-printed, two-space-indented JSON. The Swap button feeds the current output back in as the new input in the opposite direction, so you can round-trip a document and compare formats. Parsing and serializing are handled by the well-tested smol-toml engine, so tables, arrays of tables, inline tables, dates and multiline strings are handled correctly rather than by a fragile hand-written parser. If your input has a syntax error, the exact message is shown so you can fix it instead of getting silent, broken output.

Why convert between JSON and TOML

JSON and TOML describe the same kinds of data — tables (objects), arrays, strings, numbers, booleans and dates — but TOML is designed to be easy for humans to read and write in config files (Rust's Cargo.toml, Python's pyproject.toml, many app configs), while JSON is what most APIs and programs expect. Converting lets you author in whichever format is comfortable and hand off in whichever the tool on the other side needs. Because TOML's document root must be a table, a top-level JSON array or bare value can't be represented and is reported as an error rather than converted incorrectly. Everything runs locally in your browser, so even secrets in a config file never leave your device.

Frequently asked questions

Does the conversion work both ways?

Yes. Choose JSON → TOML or TOML → JSON, or use the Swap button to turn the output back into input in the opposite direction for a quick round-trip.

Why do I get an error converting a JSON array to TOML?

TOML's document root must be a table (an object), so a top-level array like [1,2,3] or a bare value has no valid TOML representation. Wrap it in an object — for example {"items":[1,2,3]} — and it converts cleanly.

Is my data uploaded anywhere?

No. Parsing and conversion run entirely in your browser with JavaScript. Nothing you paste is sent to a server or stored, so it is safe for config files that contain secrets.