Free tool · TOML 1.0 · runs in your browser
TOML to JSON converter.
Paste a Cargo.toml, pyproject.toml or any TOML config and get clean JSON as you type. Flip it to turn JSON into TOML. Syntax errors point at the exact line and column.
Short answer: TOML tables become JSON objects, arrays of tables ([[bin]]) become JSON arrays, and dates become ISO strings. Going back, JSON null has no TOML form, so it has to go first.
Loading the parser...
Worked example
The sample above is a typical Cargo.toml. serde = { version = "1.0", features = ["derive"] } is an inline table, so it becomes "serde": {"version": "1.0", "features": ["derive"]}. [profile.release] is a dotted table header, so it nests: "profile": {"release": {"lto": true, "codegen-units": 1}}. [[bin]] is an array of tables, so "bin" becomes a JSON array with one object per [[bin]] block. The 17-line file becomes 35 lines of 2-space JSON.
How it works
- Parser. smol-toml 1.3.1, a TOML 1.0.0 parser, loaded from jsDelivr when you open this page. Your text is parsed on your device and never uploaded.
- Types that don't map one to one (TOML 1.0.0 spec): dates and times become ISO 8601 strings in JSON. TOML integers are 64-bit, and any integer bigger than JavaScript can hold exactly (253) is written as a string so no digit is lost.
infandnanfloats have no JSON form and become strings too. - JSON to TOML. The top level must be an object, because a TOML document is a table. TOML has no
null, so the converter tells you the path of any null to remove first. Comments can't survive a round trip; JSON has none. - Errors. Bad TOML stops with the line and column, the same way Cargo would refuse the file.
Sources
- TOML v1.0.0 specification, read Oct 23, 2026
- smol-toml (BSD-3-Clause), version 1.3.1, read Oct 23, 2026
Related
- JSON to Rust struct (serde)
- Semver checker: what your Cargo.toml versions really allow
- Cron expression translator
Who made this
Matt Busel, who keeps 69 Rust crates and their Cargo.toml files in order. Nothing you paste leaves this page.