go-supertools
Developer & Data Tools

TOML to JSON Converter

Convert TOML to JSON in your browser.

Runs in your browser Your input never leaves your device.

0 characters | 0 words

Report a problem with this tool

About this tool

TOML is the configuration format of Rust's Cargo, Python's pyproject.toml, Hugo and many tools. Paste a TOML document and get the same data as JSON, ready for scripts, validators or other converters. The parser follows the TOML 1.0 specification: tables, arrays of tables, inline tables, multi-line strings, dates and times. We compared it with Python's built-in tomllib on 300 generated documents full of awkward cases (quotes, backslashes, Unicode, nested tables, arrays of tables, every kind of date and time), with identical data. Dates and times are written as text in TOML's own format. Integers larger than JavaScript can hold exactly (beyond 9,007,199,254,740,991) are shown as strings so no digit is lost. The special floats inf and nan, which JSON cannot hold, are written as the text "inf", "-inf" and "nan". Errors name the line and the problem, for example a key defined twice, which TOML forbids. Everything runs in your browser; nothing is uploaded.

How to use it

  1. Paste your TOML.
  2. Choose the indent.
  3. Copy the JSON.

Common problems

It says a key is defined twice
TOML does not allow the same key or table to appear twice in one table. Remove or rename one.
A date became a string
JSON has no date type, so TOML dates and times are written as ISO text, in the form they have in the TOML document.
A huge number is shown in quotes
JSON numbers in many programs lose digits beyond 15 or 16 digits. Integers beyond that range are written as strings to keep every digit.