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
- Cargo.toml — Rust's package manager uses TOML for dependencies, features, and build settings.
- pyproject.toml — the modern standard for Python project metadata, build systems, and tool configuration (Black, Ruff, pytest).
- Application config — TOML's sections and comments make it ideal for human-edited settings files.
- Static site generators & CI tools — Hugo, Netlify, and others accept TOML config.
Key Differences Between JSON and TOML
- TOML supports comments (
# comment); JSON does not. - TOML uses sections like
[server]and[[products]](arrays of tables) instead of nested braces. - TOML has first-class dates and times as native types.
- TOML keys can be written unquoted (bare keys), making files cleaner.
- JSON is a strict subset of JavaScript and is universally parseable; TOML is config-focused.
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
[[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.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.