JSON ↔ TOML Converter

Switch between JSON and TOML for Cargo, pyproject, and other configs. Pick a direction, paste or upload, then copy or download. Uses @iarna/toml (ISC) bundled on this page—nothing is sent to a server. For YAML, use JSON ↔ YAML; for JSON-only formatting, use the JSON formatter.

Clear

Or upload a JSON file

Max 10 MB UTF-8 · processed locally

Output

Runs only in your browser. Bundled @iarna/toml (ISC).

How to convert JSON and TOML online

Choose a direction, validate input with Convert, then copy or download the other format.

Pick JSON → TOML or TOML → JSON

Tabs switch labels, placeholders, and which file types the uploader suggests.

Paste or upload

Stay under the size limit. JSON must be valid; for TOML output the JSON root must be a single object (not an array).

Convert and export

For TOML → JSON, choose indent, then copy or download .json or .toml.

Why Use a JSON ↔ TOML Converter?

Rust (Cargo.toml), Python (pyproject.toml), and many static-site configs use TOML, while APIs and browsers favor JSON. Converting locally keeps tokens and secrets off third-party paste sites.

Config workflows

Turn JSON samples into TOML snippets for manifests—or flatten TOML to JSON for tools that only accept JSON.

No CLI required

Paste from docs or CI logs without installing taplo or other CLIs.

Explicit errors

Invalid JSON or TOML surfaces the parser message so you can fix syntax quickly.

Pretty-printed JSON

TOML → JSON supports 2- or 4-space indentation for readable output.

Private and Secure

Conversion runs entirely in your browser. Text and files are not uploaded, logged, or stored on any server.

Local processing

@iarna/toml runs in your tab only; your data never leaves the device.

No account or API

No keys, quotas, or backend—just static pages and scripts.

Size limits on purpose

Large pastes are rejected to reduce memory pressure and keep the tab responsive.

Frequently asked questions

About 10 MB of UTF-8 text per paste or file, aligned with other JSON tools on this site.
A TOML document is a set of key/value pairs at the root (a table), not a bare array. Wrap arrays in an object key if you need to represent them.
JSON has no native datetime. Parsed TOML dates become ISO strings in JSON; converting back to TOML may use a different but equivalent representation.
No. Parsing and stringifying run in your browser; the library ships with the page.
The formatter only prettifies or minifies JSON. Here you change the serialization format between JSON and TOML.