TOML to JSON Converter

Convert TOML documents to structured JSON trees. Fast, free, and fully client-side.

Input source
Result / Output

How the TOML to JSON Converter Works

Parses a TOML document and returns it as JSON with two-space indentation. Table headers become nested objects, so each dotted section path is reflected in the output structure. Empty input returns an empty object, and anything the TOML parser rejects is reported as an error. Conversion runs in your browser and the file is never uploaded.

Usage Example

Converting a pyproject.toml into JSON so a build script can read the list of declared dependencies.

Frequently Asked Questions

What does an empty input return?

Empty input produces an empty JSON object, shown as {} with no error. Any content that the TOML parser rejects, such as an unquoted string value, is reported as an error instead.

How are dotted table headers converted?

Each segment of a header becomes one level of nesting, so a section named tool.poetry.dependencies appears as tool, then poetry, then dependencies in the JSON output.

What happens to an invalid TOML file?

The parser error message is shown instead of JSON output. Read the message for the line or construct it names, correct that part of the TOML, and convert again.

Browse more

See all JSON tools.