TOML to JSON Converter Online — Free & Private

Paste Cargo.toml, pyproject.toml or other TOML configs and get indented JSON for APIs and CI gates. Single document only, and processing stays local.

Loading…
TOML → JSON for Cargo and pyproject files
Parses a TOML file and writes strict JSON for APIs, scripts and CI checks.

Developer notes

TOML comments are dropped, so the JSON has no comment syntax. Paste one TOML document at a time. Dates and times become ISO 8601 strings, and a warning names each one. Choose compact JSON for logs or indented JSON for reviews.

Use cases

Feed TOML configuration to a validator that only reads JSON. Compare changes in a Cargo.toml as JSON trees. Bridge Rust or Python configuration into JavaScript tooling.

About these options

For CSV output, choose the delimiter, how fields are quoted, the line endings and whether to write a header row. Auto uses a comma in English and a semicolon in French, German and Spanish, as Excel expects. For CSV input, the delimiter is detected on the first line (comma, semicolon, tab or pipe). You choose whether that line holds the column names. JSON output can use 2 or 4 spaces or a single line, with an optional recursive key sort. XML output can be pretty-printed with a chosen indent width. YAML output takes an indent width and a quoting mode for strings. XML comments are dropped, because the conversion goes through a JSON tree.

Examples

Cargo package

Input

# FastMinify library manifest [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": { "serde": { "version": "1.0", "features": [ "derive" ] }, "tokio": "1.35" }, "features": { "default": [ "cli" ], "cli": [] } }

Dependencies table

Input

[project] name = "fastminify-cli" version = "2.1.0" requires-python = ">=3.11" [project.dependencies] click = ">=8.1" rich = ">=13.0"

Output

{ "project": { "name": "fastminify-cli", "version": "2.1.0", "requires-python": ">=3.11", "dependencies": { "click": ">=8.1", "rich": ">=13.0" } } }

Related tools

Go back with JSON → TOML, check the JSON with the JSON validator, or shrink TOML with the TOML minifier.

TOML → JSON FAQ

Strict JSON output

Can I paste a Cargo workspace?

Paste one file at a time. Merging the members of a workspace is out of scope.

How are dates and times written?

As ISO 8601 strings, with a warning for each date.

What happens to TOML comments?

They are removed during the read. The output is strict JSON, not JSONC or JSON5, so a line like # manifest never appears in the result.

Is my data sent to a server?

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

Convert TOML to JSON, YAML, XML, CSV, Properties and INI.