loot.tools

JSON to TOML Converter

Paste JSON to get TOML, or paste TOML to get JSON. Nested objects become [table] headers, arrays of objects become [[array of tables]], and strings, numbers, booleans, and arrays carry over with the right TOML types. Handy for Cargo.toml, pyproject.toml, Hugo, and any config that uses TOML. Everything runs in your browser.

Convert JSON to TOML or TOML back to JSON, right in your browser. Nested objects become [table] headers and arrays of objects become [[array of tables]]. TOML has no null type, so null values are dropped on the way out.

JSON Input
TOML Output

What this tool does

It turns JSON into TOML and TOML back into JSON. Going to TOML, an object's plain values are written as key = value pairs, nested objects get their own [table] headers, and a list of objects becomes a [[table]] repeated for each item. Going to JSON, the TOML is parsed back into the matching object, arrays, numbers, and booleans. Both directions update as you type and never touch a server.

Why you'd use this

TOML is the config format behind Cargo (Rust), pyproject.toml (Python), Hugo, and plenty of other tools, but most APIs and editors still hand you JSON. Converting between the two by hand is fiddly once you have nested tables and arrays. Paste it here and get clean output you can drop straight into a config file or a request body.

What's supported

The parser handles bare and quoted keys, dotted keys, [table] and [[array of table]] headers, basic and literal strings (including the multi-line forms), integers with 0x/0o/0b prefixes and underscores, floats, inf and nan, booleans, arrays, and inline tables. Comments are ignored. Date-time values are kept as strings since JSON has no date type, and because TOML has no null, any null in your JSON is dropped on the way out.