TOML → JSON

Turn TOML configs into clean JSON — without leaving your browser.

Your data is processed entirely in your browser and is never uploaded.

Tool workspace

INPUT TOML

Drag & drop file here or browse

TOML Status: Empty0 chars

Options

Local sandbox active
OUTPUT JSON
Output: Empty0 chars
HOW IT WORKS

Convert TOML in three steps

Paste or drop

Any .toml config — validity reads as you type, up to 15M characters.

Convert

Press Convert (or Ctrl/⌘ + Enter). Big files run in a background worker.

Take the JSON

Copy or download pretty-printed JSON — 2-space, 4-space, or tabs.

Docs · Convert

Turning a config into a JSON tree

TOML → JSON parses a TOML config and re-serializes it as pretty-printed JSON. Tables become nested objects, arrays stay arrays, and the parser reports exact line numbers when something is wrong. Three things change in the crossing: TOML datetimes become ISO-8601 strings because JSON has no date type; comments are dropped because JSON has nowhere to keep them; and TOML's integer/float distinction flattens into JSON's single number type (inf and nan become null). Duplicate keys are refused with a line and column rather than silently collapsed. Large files run in a background worker so the editor never locks up.

Common issues & tips

Duplicate keys are refused

The TOML spec forbids duplicate keys, and the parser refuses rather than silently keeping one — you get an exact line and column so you can fix it.

name = "Ada"
name = "Alan"
Bad indentation in a table

TOML is not whitespace-sensitive for structure, but a malformed table header breaks the parse. Load this and the caret lands on the offending line.

[server]
host = "localhost"
  port = 5432
Dates become ISO strings

A TOML datetime converts to an ISO-8601 string in JSON — JSON has no date type. Load this and convert; the output carries the full timestamp as text.

released = 2026-08-02T12:00:00Z
Comments disappear

JSON has no comment syntax, so every # comment is dropped on conversion. If a comment carries real information, move it into a data field before converting.

Try these

Simple config
name = "Ada"
role = "engineer"
level = 7

Flat keys map straight to JSON.

Nested tables
[database]
host = "localhost"
ports = [5432, 5433]

Tables become nested JSON objects.

Array of tables
[[servers]]
host = "a"
active = true

[[servers]]
host = "b"
active = false

An array of tables becomes an array of objects.

pair this withFormat the result → JSON Formatter·Validate the result → JSON Validator·Convert YAML instead → YAML → JSON

FAQ

Frequently asked questions

Is my TOML uploaded anywhere?

No. Parsing runs entirely in your browser (in a background worker for large files). Your config never leaves your machine.

What happens to dates and comments?

TOML datetimes become ISO-8601 strings (JSON has no date type), and comments are dropped because JSON has nowhere to keep them. Tables become nested objects.

Do integers stay integers?

JSON has one number type, so TOML's integer/float distinction flattens into numbers. Very large integers (beyond 253) can lose precision — that's a JSON limit, not a bug here. inf and nan become null.

What about duplicate keys?

The TOML spec forbids them, and the parser refuses rather than silently keeping one — you'll get an exact line and column so you can fix it.