Skip to content
migration.tools
JSON to TOML

JSON to TOML converter

Convert JSON configuration to TOML for pyproject.toml, Cargo, Hugo or Netlify. Nested objects become tables and arrays of objects become [[arrays of tables]].

Going the other way? TOML to JSON

JSON

TOML

The result appears here as soon as there is input.

Processed on this device. Nothing you paste or drop is uploaded.

How to use it

  1. 1Paste your JSON or drop a file onto the input panel.
  2. 2Adjust the options — the result updates as you type.
  3. 3Copy the TOML or download it. Drop several files to convert a batch into one ZIP.

How JSON becomes TOML

JSON and TOML both describe nested data, so structure carries over directly: objects stay objects, lists stay lists, and key order is kept.

The differences are in the details each format can express — comments, nulls, dates and attributes — and the notes under the output tell you whenever something had to be adapted.

JSON and TOML, briefly

JSON is the default language of web APIs and document databases. It nests objects and arrays to any depth and distinguishes strings, numbers, booleans and null, but has no comments and no date type.

TOML is a configuration format built to be obvious to read: pyproject.toml, Cargo.toml, Netlify and Hugo all use it. It has real dates and typed values, but the top level must be a table and there is no null.

Questions

What if my JSON isn't an array of objects?

The converter looks for the list of records inside the document — for example the array under "data" or "items" in an API response — and tells you which one it used. A single object becomes one row.

What happens to null values and top-level lists?

TOML has no null, so empty values are left out. It also requires a table at the top level, so a list is placed under an "items" key. The tool tells you whenever it does either.

Guides that use this tool