JSON Input
paste or type · or drop a .json file
TOML Output
Convertedjson-to-toml

JSON to TOML: from API response to config file

When you're scaffolding a new Rust crate, Python package, or CLI tool, you often start from a JSON example (an API response, a design doc) and need it as a real Cargo.toml or pyproject.toml.

This converter turns any JSON object into equivalent TOML: nested objects become tables, arrays of objects become arrays of tables ([[items]]).

What TOML cannot represent

TOML's type system is deliberately small, and two common JSON shapes have no TOML equivalent.

Top-level arrayNot allowed — TOML documents must be a table (object) at the root
nullNo null literal exists in TOML — remove the key or give it a real value
Nested objects & arraysFully supported, as tables and arrays of tables

Why the converter refuses instead of guessing

Some TOML libraries silently drop null fields rather than erroring, which quietly changes your data. This tool checks for both cases first and tells you exactly which key is the problem, so nothing gets lost without you knowing.

Everything runs locally: it is safe to paste config values that include internal package names or private registry URLs.