Skip to content
migration.tools
TOML to JSON

TOML to JSON converter

Convert TOML to JSON to inspect a config, validate it against a JSON Schema, or pass it to a tool that only reads JSON.

Going the other way? JSON to TOML

Options

TOML

JSON

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 TOML or drop a file onto the input panel.
  2. 2Adjust the options — the result updates as you type.
  3. 3Copy the JSON or download it. Drop several files to convert a batch into one ZIP.

How TOML becomes JSON

TOML and JSON 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.

TOML and JSON, briefly

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.

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.

Questions

How are TOML dates and tables converted?

Dates and times are written as ISO 8601 strings. Tables become objects and arrays of tables ([[name]]) become arrays of objects.

Does the converter guess data types?

Yes, unless you turn it off. Whole numbers, decimals, true and false become real JSON numbers and booleans. Values with leading zeros (like ZIP code 00501), numbers longer than 15 digits and anything that isn't unambiguously numeric stay as strings, so IDs and phone numbers survive intact.

Guides that use this tool