JSON → TOML

Turn JSON into readable TOML — tables, arrays-of-tables, and all.

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

Tool workspace

INPUT JSON

Drag & drop file here or browse

JSON Status: Empty0 chars

Options

TOML has no null. Refuse is the honest default; strip removes them.

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

Convert JSON in three steps

Paste or drop

Any JSON object — validity reads as you type, up to 15M characters.

Convert

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

Take the TOML

Copy or download the result — objects become [tables], arrays of objects become [[arrays.of.tables]].

Docs · Convert

Translating JSON into a config format with no null

JSON → TOML parses a JSON object and writes it back as TOML: objects become [tables], arrays of objects become [[arrays.of.tables]], and scalars keep their types. The one real friction is null — TOML has no null value, so by default the converter refuses and points at the exact path (like limits.timeout or tools[2]); switch to "Strip nulls" to drop those keys/elements and convert anyway. A top-level JSON array fails too, because TOML's root must be a table. Large files run in a background worker, and the output is clean, hand-editable TOML.

Common issues & tips

TOML has no null

A JSON null has nowhere to live in TOML. The converter refuses by default and names the exact path; switch to "Strip nulls" to drop those keys and convert anyway.

{"limits": {"timeout": null, "retries": 3}}
A top-level array has no home

TOML's root must be a table (an object). A top-level JSON array, or a bare string, number, or boolean, has nowhere to live — the converter explains that instead of wrapping it in a made-up key.

[{"name": "Ada"}, {"name": "Alan"}]
Numbers keep their shape

JSON's single number type maps to TOML integers and floats. Very large integers (beyond 2^53) can lose precision — that's a JSON limit, not a bug here.

Objects become tables

A nested object becomes a [table]; an array of objects becomes an [[array.of.tables]]. Plain arrays of scalars become inline arrays, and order is preserved.

{"servers": [{"host": "a", "port": 80}, {"host": "b", "port": 443}]}

Try these

Simple object
{"name": "Ada", "role": "engineer", "level": 7}

Flat keys map straight to TOML.

Nested tables
{"database": {"host": "localhost", "ports": [5432, 5433]}}

Objects become [tables]; nested values stay grouped.

Array of tables
{"servers": [{"host": "a", "active": true}, {"host": "b", "active": false}]}

An array of objects becomes [[arrays.of.tables]].

pair this withReverse it → TOML → JSON·Validate the source → JSON Validator·Or convert to YAML → JSON → YAML

FAQ

Frequently asked questions

Is my JSON uploaded anywhere?

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

Why does a top-level array fail?

TOML's root must be a table (an object). A top-level JSON array — or a bare string, number, or boolean — has nowhere to live, so we explain that instead of silently wrapping it in a made-up key.

What happens to null?

TOML has no null value. By default we refuse and point at the exact path (likelimits.timeout or tools[2]); switch to "Strip nulls" to drop those keys/elements and convert anyway.

Do numbers stay exact?

JSON's single number type maps to TOML integers and floats. Very large integers (beyond 253) can lose precision — that's a JSON limit, not a bug here.