JSON ↔ TOML Converter

Convert between JSON and TOML formats. Handles tables, arrays of tables, inline tables, and every scalar type. Runs entirely in your browser.

JSON and TOML: When to Use Each Configuration Format

TOML (Tom's Obvious, Minimal Language) is a configuration format designed to be easy for humans to read and write, with a clear mapping to a hash table. It has become the standard for config files in the Rust ecosystem (Cargo.toml), modern Python packaging (pyproject.toml), and many other tools. JSON, meanwhile, dominates data interchange and APIs. Converting between them lets you move config and data between these worlds.

When TOML Shines

Key Differences Between JSON and TOML

How This Converter Works

Everything runs locally in your browser. For JSON to TOML, the tool parses your JSON into an object and serializes it as TOML — objects become [tables], arrays of objects become [[arrays of tables]], and scalars are written with their TOML types. For TOML to JSON, it parses the TOML (including dotted keys, inline tables, and multiline strings) into an object and pretty-prints it as JSON. Note that TOML dates and comments don't have JSON equivalents: dates round-trip as strings, and comments are dropped.

Frequently Asked Questions

No. All conversion happens entirely in your browser using JavaScript. Your data never leaves your device, making it safe for Cargo.toml, pyproject.toml, secrets, and any other configuration.
The converter handles tables, nested and dotted tables, arrays of tables ([[name]]), inline tables, arrays (including nested and multiline), all scalar types (strings, integers in decimal/hex/octal/binary, floats with inf/nan, booleans), basic and literal strings, multiline strings, and comments.
Yes — the converter is bidirectional. Paste TOML and switch to "TOML → JSON". Keep in mind that TOML comments are not preserved when converting to JSON, since JSON has no comment syntax.
JSON has no native date type, so TOML datetimes are converted to JSON strings (and back to quoted strings). The textual value is preserved exactly so no information is lost.
Generating a pyproject.toml or Cargo.toml from JSON data, inspecting a TOML config as JSON for processing with jq, or migrating settings between tools that expect different formats.