JSON to TOML Converter - Free Online Tool

AdSense Placeholder
Slot: header_tool

JSON to TOML Converter

Convert JSON objects to TOML configuration files

AdSense Placeholder
Slot: tool_mid_article

Clean TOML Output

Objects become [tables], arrays of objects become [[arrays of tables]], and keys with spaces or dots are quoted for you.

Clear About Limits

TOML has no null and needs a table at the top level. The tool tells you when something cannot be converted instead of guessing.

Round-Trip Checked

The output was read back with Python’s tomllib on hundreds of documents and gave the original data every time.

Private

The conversion runs in your browser. Your data is never uploaded.

From JSON to TOML

Many modern tools use TOML for configuration because it supports comments and is easier to edit by hand than JSON. When a project starts from a JSON file, or when you have the settings as JSON from an API, this tool writes the same data as TOML, ready to paste into a config file.

A few things need care. A TOML file is always a table, so the top level of the JSON must be an object. TOML has no null: keys whose value is null are left out (the tool tells you how many), and a null inside an array is reported as an error. JSON does not distinguish 1 from 1.0, so a number written as 1.0 becomes the integer 1 in the TOML. Strings that look like dates stay strings.

Key Takeaways

  • Top level must be an object: An array or a single value cannot be a TOML document.
  • Nulls are dropped: Keys holding null are omitted, because TOML cannot represent them.
  • Related tools: Use the TOML to JSON Converter for the reverse direction.
AdSense Placeholder
Slot: footer_leaderboard