TOML to JSON Converter

← All tools

Paste TOML and get JSON, or paste a JSON object and get TOML. The text stays in the browser.

Nothing is uploaded. The document is not stored in the URL. Only the direction is, and only when you convert JSON to TOML.

Direction

Open file…

Files up to 1 MB open in the page. The page stops at 1,000,000 characters.

Not converted

Result

About this tool

The parser and the writer are smol-toml. This page was checked against smol-toml 1.9.1 on November 4, 2026. JSON is written with an indent of two spaces. TOML comes back with a trailing newline, the shape smol-toml writes: top-level keys, then tables, then arrays of tables.

A TOML date becomes the string from its toJSON method. An offset datetime keeps its offset. A local datetime has no Z. A local date is the calendar day. A local time keeps the fractional seconds the library writes, including .000 when the source omitted them. A hex integer such as 0x10 becomes the number 16.

JSON has no NaN or Infinity. Those TOML values become null, and the page lists the path. The other direction rejects any null, because smol-toml drops a null key instead of writing it. The JSON root has to be an object. An array or a single value is not a TOML document. An integer that JavaScript cannot store exactly is an error, with the line and column. The page does not turn that integer into a bigint.

Read more

Free books, courses, and software

Get my programming books, course editions, and complete software.

Get the download library →