Skip to main content
QUIETLYTIC
Developer

TOML to JSON Converter

Parse a TOML document — tables, arrays of tables and all — into JSON.

Local · nothing leaves this browser Waiting for TOML
Esc Clear
JSON

Paste TOML on the left.

How it works

TOML's whole design goal is to be an obvious, unambiguous mapping onto a JSON-shaped value — every TOML document already describes tables, arrays and typed scalars, which is exactly what JSON needs. This parses that structure and renders the equivalent JSON directly, including [[array.of.tables]] headers, dotted keys and inline tables — and it enforces TOML's rule that a key or table may be defined only once.

Date-times come through as strings

TOML has a native date-time type with no JSON equivalent, so 2026-09-21T10:00:00Z is kept as the literal string it was written as, rather than being converted to a JS Date and re-serialised in whatever format that happens to produce — the same choice this site's YAML ↔ JSON converter makes for the same reason.

What is refused, and why

inf and nan are valid TOML floats, and integers may be up to 64 bits wide — but JSON has no infinity or NaN, and a JavaScript number cannot hold an integer past 253 exactly. Rather than emit null or a silently rounded number, the converter stops and names the line.

Example

[package] name = "example" version = "1.0.0" converts to {"package":{"name":"example","version":"1.0.0"}}, the same table-header structure Cargo and Python packaging both use.

Frequently asked questions

Why keep dates as strings instead of converting them?

Because a JS Date has no lossless round trip back to an arbitrary RFC 3339 string — timezone offsets, fractional-second precision and the exact literal a config author wrote can all change on the way through. Keeping the source string is the only way the value stays exactly what was written.

How does it handle [[array.of.tables]]?

Each occurrence of a double-bracketed header appends a new object to an array at that path — the standard TOML construct Cargo.toml uses for repeated [[dependencies]] blocks. A single-bracketed [table] instead sets or descends into one object.

What happens with a hex or binary number?

It is reported as a syntax error at the line it occurs, rather than being read as decimal or dropped. Those literal forms are uncommon enough outside systems-level config that a wrong silent read is worse than an honest rejection.

Related tools

From the intelligence desk