JSON to TOML Converter
Your data never leaves your browserPaste JSON, get valid TOML. Built for Cargo.toml, pyproject.toml, and static site config. 100% in your browser.
Share this tool
Found it useful? Help a fellow developer discover it.
Paste JSON, get valid TOML. Built for Cargo.toml, pyproject.toml, and static site config. 100% in your browser.
Share this tool
Found it useful? Help a fellow developer discover it.
Going the other way, reading a Cargo.toml or pyproject.toml as JSON?
Convert TOML to JSON
TOML is the config format of the Rust and modern Python toolchains, and it is what static site generators reach for. JSON is what your scripts, APIs, and package registries hand you. So you end up needing a bridge: a generated dependency set that has to land in Cargo.toml, a build matrix computed in JavaScript that belongs in pyproject.toml, or a site config exported from a CMS that has to become a Hugo config file. TOML's table syntax is the part people get wrong by hand, because nested objects become bracketed section headers whose ordering matters. This converter handles that nesting for you.
Maps directly
Worth knowing
[table] sections..toml file, ready to commit.Paste a JSON object into the left panel. This page opens already set to the JSON to TOML direction, so valid TOML appears on the right immediately. Copy it or download it as a .toml file. Everything runs in your browser.
A TOML document is a table at the top level, which means the root has to be a set of key-value pairs. A JSON array has no keys at the root, so there is nothing to name the entries. Wrap the array in an object first, for example {"items": [ ... ]}, and it converts cleanly into an array or an array of tables.
TOML has no null type, so keys whose value is null are omitted from the output rather than being written as an empty or placeholder value. If a key needs to exist in the TOML, give it a real value such as an empty string or false before converting.
That ordering is required by TOML, not a stylistic choice. Once a [table] header appears, every key that follows belongs to that table until the next header. Any top-level scalar or array therefore has to be written before the first header, otherwise it would be silently reparented into a table.
The syntax will be valid TOML that Cargo and Python build backends parse. Whether the file is a valid manifest depends on your JSON containing the sections those tools require, such as [package] with name and version for Cargo. The converter represents your structure faithfully, it does not add required fields.
As TOML arrays of tables, written with double brackets, for example [[dependencies]] repeated once per element. This is the idiomatic TOML form and is what Cargo and most TOML consumers expect for repeated sections.
Use the Swap button to flip direction in place with the current output as input, or open the TOML to JSON converter, a separate page written around reading Cargo.toml, pyproject.toml and Hugo config as JSON.
No. Parsing and serialization both happen in your browser with client-side JavaScript. Config files often carry registry tokens and deploy keys, so nothing is transmitted, stored, or logged.
TOML to JSON Converter
Convert TOML to JSON or JSON to TOML. Supports Cargo.toml, pyproject.toml, and Hugo config files. Bidirectional.
JSON to YAML Converter
Convert JSON to YAML instantly. Produces clean, indentation-based YAML for Kubernetes manifests, Docker Compose, and CI workflow files.
JSON Formatter & Validator
Format, beautify, validate, and minify JSON. Detects BigInt precision issues, duplicate keys, and JSONC comments.
.env to JSON / YAML Converter
Read a .env file as JSON or YAML. Handles comments, quotes, export prefixes, and nested keys. Runs in your browser.