JSON to TOML Converter

Convert JSON objects to TOML for pyproject.toml, Cargo, and config files.

  • 100% client-side · your data never leaves your browser
  • Instant, no rate limits
  • Free, no sign-up
Input JSON
TOML

Your result appears here

Paste JSON into the panel on the left — everything runs privately in your browser.

Overview

JSON to TOML Converter — JSON Config to TOML

Convert JSON objects to TOML for Python packaging, Rust projects, and tools that expect .toml files. Nested JSON maps to TOML tables and dotted keys where appropriate. Free, instant, and private — ideal for migrating JSON settings to TOML-based workflows.

No uploadsNo sign-upOpen source
  1. JSON vs TOML

    JSON is strict and universal; TOML favors readability and is common in static project metadata. Converting JSON samples to TOML helps authors write pyproject.toml or tool configs without memorizing every TOML nuance.

  2. How JSON maps to TOML

    Objects become TOML tables, and nested objects become dotted or [section] tables. Arrays of objects become arrays of tables ([[...]]), while arrays of scalars stay inline. Strings, numbers, and booleans convert directly. Because TOML is table-oriented, an object at the root converts most cleanly.

  3. Writing pyproject.toml and Cargo.toml

    If you're comfortable with JSON but new to TOML, converting a JSON draft is a fast way to produce correct pyproject.toml, Cargo.toml, or tool-config syntax without memorizing TOML's table rules. Generate the TOML, then adjust sections and add comments by hand.

  4. Limitations

    Root-level arrays and non-object roots don't map cleanly to every TOML consumer, since TOML expects a table at the top. Prefer object-root JSON for config conversion, and round-trip through the TOML to JSON converter to confirm the structure survived.

FAQ

Frequently asked questions

How do I convert JSON to TOML?

Paste an object-root JSON document and JsonDrift returns equivalent TOML with tables and arrays of tables, ready for pyproject.toml or Cargo.toml.

Can I convert arrays at the root?

TOML is table-oriented, so object-root JSON works best; root arrays may need manual adjustment.

Does the output include comments?

No. JSON carries no comments, so add any TOML comments by hand after conversion.

Is my JSON uploaded?

No. Conversion runs entirely in your browser, so configs and secrets stay local.

Continue with a related tool

All tools

Learn more in our guides

All guides