TOML ⇄ JSON Converter

Convert between TOML and JSON in either direction, with validation.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

A two-way TOML ⇄ JSON converter that turns one format into the other the moment you paste it. It is built for developers wrangling configuration files — moving a Cargo.toml, pyproject.toml, netlify.toml or any hand-written config into JSON for a script or an API, and back again for a human to edit. Paste either format on the left and the converted result appears live on the right, ready to copy or download.

How it works

The converter runs a full TOML 1.0.0 parser entirely in your browser, so it handles far more than basic key/value pairs: named [tables], [[arrays of tables]], inline tables, dotted keys, multi-line basic and literal strings, and integers written in hex, octal or binary. When you paste, the tool inspects the text — anything that begins with { or [ and parses as valid JSON is treated as JSON; everything else is treated as TOML. You can override that guess at any time with the direction dropdown.

Because the two formats do not have identical type systems, the converter bridges the gaps explicitly rather than silently corrupting data. TOML’s date and time values become ISO-8601 strings in JSON. Very large TOML integers, which exceed JavaScript’s safe number range, are emitted as strings so no precision is lost. Going the other way, JSON null has no TOML equivalent, so null values are stripped and a clear warning is shown. If you paste invalid TOML, the error message points at the exact line and column so you can find the typo fast. You can choose 2-space, 4-space or tab indentation for the JSON output, and the Use as input button feeds the result straight back in so you can round-trip a file and confirm it survives the trip unchanged.

Example

Paste this TOML:

title = "Gera Tools" followed by a [owner] table with team = "platform", and the tool returns the equivalent JSON object { "title": "Gera Tools", "owner": { "team": "platform" } }. Switch the dropdown to JSON → TOML, paste that object back, and you get the original TOML structure again — tables, arrays and all. The table below shows how common values map across the two formats.

ConceptTOMLJSON
Stringname = "eu-1""name": "eu-1"
Integerport = 8080"port": 8080
Booleanactive = true"active": true
Arrayports = [8080, 8081]"ports": [8080, 8081]
Table[owner]"owner": { ... }
Datelaunched = 2026-05-30T09:00:00Z"launched": "2026-05-30T09:00:00.000Z"

Everything is processed locally in your browser — no file you paste is ever uploaded or stored on a server.

Ad placeholder (rectangle)