JSON to TOML & TOML to JSON — Free Converter
Convert JSON to TOML and TOML to JSON for free online. Tables, arrays of tables, scalars all supported. Browser-based — no signup.
Convert any JSON object to TOML. Tables, arrays of tables, scalars all supported. Useful when porting configs between projects (e.g. JSON config dump → Cargo.toml fragment) without doing the conversion by hand.
Prefer YAML? JSON to YAML. Need XML? JSON to XML.
How to Convert JSON to TOML
Paste your JSON
Drop the configuration object you want as TOML into the editor.
Click Convert to TOML
PDFFlare emits idiomatic TOML with tables, arrays of tables, and scalars in the right form.
Copy and use
Drop the result into a Cargo.toml, pyproject.toml, or any TOML config file.
When Do You Need JSON → TOML?
Cargo / pyproject migrations: Moving a project to Rust or Python? Convert your existing JSON config to TOML in one click.
Hugo / Zola sites: Static-site generators love TOML for front-matter and config. Convert API output to TOML to seed templates.
Sharing config snippets: Cargo, pyproject, and other TOML files have a strong convention. Converting JSON to TOML keeps you idiomatic.
Format comparison: Seeing the same data side-by-side in JSON and TOML is a fast way to learn TOML's syntax.
Why Use PDFFlare for JSON → TOML?
Idiomatic Tables
Nested objects produce dotted-table headers; arrays of objects use [[arrays-of-tables]].
Friendly Errors
Unsupported shapes (null, mixed arrays) produce clear errors — not silently broken TOML.
100% Browser-Based
Your config stays on your device.
No Signup Required
No account, no rate limits.
Frequently Asked Questions About JSON to TOML
TOML (Tom's Obvious Minimal Language) is the config format for Cargo (Rust), pyproject (Python), Hugo, Helm, and many other tools. It's like INI but with structured types.
When you have a JSON config dump from one tool that needs to live in a TOML-only consumer, this saves the manual transcription. Common when porting projects between language ecosystems.
Plain objects (mapped to tables), arrays of objects (mapped to arrays of tables), arrays of primitives, scalars (string/number/boolean). Nested objects produce nested tables with dotted keys.
TOML can't represent null, mixed-type arrays of complex values, or arrays of arrays cleanly. The tool throws a friendly error in those cases instead of producing broken TOML.
Yes — pick 'TOML → JSON' from the Direction dropdown. The TOML parser is smol-toml (lazy-loaded, ~10KB) which implements the full TOML 1.0 spec: tables, arrays of tables, scalars, dates, multi-line strings.
JSON doesn't have a native date type; dates appear as strings. The converter passes them through as TOML strings — you may want to manually edit them to TOML's native datetime format if precision matters.
No. The conversion runs entirely in your browser.
TOML keys are restricted to bare identifiers (letters, digits, dots, dashes, underscores) or quoted strings. The converter quotes any non-bare key so the output is always valid.