JSON to TOML Converter Online — Free & Private

Paste JSON from APIs or exporters and preview TOML for Rust, Python and DevOps configs. Everything stays in your browser.

Loading…
JSON → TOML for Cargo and pyproject configuration
Writes validated JSON as TOML, with nested objects as tables, for Rust and Python configuration files.

Developer notes

The JSON must parse first. A syntax error stops the conversion and shows the message. The root must be an object or an array. An array is wrapped in an items key, because a TOML document needs a table at the root. Nested objects become tables, and arrays of objects become repeated [[tables]]. Sort TOML keys orders keys alphabetically at every level. Without it, keys keep the order of the JSON.

Use cases

Bootstrap a Cargo.toml from a JSON export. Move API configuration from JSON into a pyproject.toml fragment. Preview the TOML before you commit an edit.

About these options

CSV exports: choose a delimiter (Auto follows locale — semicolon on /fr), RFC-minimal vs always-quoted fields, line endings, and whether to emit a header row. CSV imports: delimiter is auto-detected from the first line (comma, semicolon, tab, or pipe) — toggle whether row 1 holds column names. JSON output (XML, YAML, or CSV sources): indentation (including compact one-line) and optional recursive key sort. JSON → XML: toggle pretty-printing and indent width. YAML output: indent width, readable vs tighter layout, and deterministic string quoting (there is no source YAML file to “preserve”). XML comments are not represented in the intermediate JSON tree.

Examples

Package metadata

Input

{ "package": { "name": "fastminify", "version": "2.1.0", "edition": "2021", "authors": ["FastMinify Team"] }, "dependencies": { "serde": { "version": "1.0", "features": ["derive"] }, "tokio": "1.35" }, "features": { "default": ["cli"], "cli": [] } }

Output

[package] name = "fastminify" version = "2.1.0" edition = "2021" authors = [ "FastMinify Team" ] [dependencies] tokio = "1.35" [dependencies.serde] version = "1.0" features = [ "derive" ] [features] default = [ "cli" ] cli = []

Python project and tool tables

Input

{ "project": { "name": "fastminify-cli", "version": "2.1.0", "requires-python": ">=3.11", "dependencies": ["click>=8.1", "rich>=13.0"] }, "tool": { "pytest": { "ini_options": { "testpaths": ["tests"] } } } }

Output

[project] name = "fastminify-cli" version = "2.1.0" requires-python = ">=3.11" dependencies = [ "click>=8.1", "rich>=13.0" ] [tool.pytest.ini_options] testpaths = [ "tests" ]

Related tools

Validate the JSON first with the JSON validator, shrink TOML with the TOML minifier, or go back with TOML → JSON.

JSON → TOML FAQ

What the output looks like

Is the key order kept?

Yes. Keys keep the order of the JSON, unless you turn on Sort TOML keys.

Are comments written?

No. The TOML has no comments, so add them by hand after the conversion.

What happens to an array at the root?

It is wrapped in an items key, because a TOML document needs a table at the root.

Is my data sent to a server?

No. The conversion runs in your browser, and FastMinify never receives what you paste.

Convert JSON to YAML, XML, CSV, TOML, TSV, SQL, HTML, Properties and INI — all in your browser.