JSON to TOML Converter
Convert JSON to valid TOML 1.0: simple values first, nested objects as [tables], arrays of objects as [[arrays of tables]], and ISO date strings as native TOML dates.
JSON to TOML Converter
Runs in your browser — nothing you enter is uploaded or stored.
Scratchpad auto-saved
How it works — in four simple steps
No signup and nothing to install — it all runs in your browser.
Add your JSON
Paste it into the left box, press Open file, or drag a .json file onto it. Sample loads a realistic example.
Set the options
Adjust the options above the boxes — the output updates instantly as you change them.
Check the result
Read the status line: it reports rows, keys and any value that couldn't be represented in TOML.
Copy or download
Copy the TOML or download it as a .toml file. Nothing was uploaded at any point.
TOML has no null: replace nulls with a real default before converting if the key must exist.
Features
Native TOML dates
ISO-8601 strings such as 2026-10-21T09:30:00Z can be written as real TOML date-times instead of quoted strings.
Private by design
Parsing and conversion run in your browser with JavaScript — your data is never uploaded, logged or stored.
About the JSON to TOML Converter
TOML can represent almost everything JSON can, but it organises it differently. Simple key/value pairs must come before any sub-table in a section, nested objects are written as [table] headers with dotted paths ([server.timeouts]), and arrays of objects use the [[double bracket]] syntax once per element. The serializer here does that ordering for you, so the output is valid TOML even when your JSON mixes values and objects in any order.
Strings are written as TOML basic strings with the required escapes, keys are left bare when they're made of letters, digits, _ and - and quoted otherwise, and arrays of simple values stay inline (ports = [80, 443]). With ISO strings → TOML dates switched on, strings like 2026-10-21 or 2026-10-21T09:30:00Z are written unquoted as real TOML dates, which is what tools like Cargo and Hugo expect for date fields.
Two JSON features have no TOML equivalent. null doesn't exist in TOML, so null values are left out and listed in a warning. And a TOML document must be a table, so a top-level JSON array is wrapped under an items key. Everything else round-trips through TOML to JSON.
Examples
An application config in JSON with nested objects, an array of objects, an ISO date and a null value that TOML can't hold.
{
"title": "Feather API",
"released": "2026-10-21",
"owner": { "name": "Pratik", "email": null },
"server": { "host": "0.0.0.0", "port": 8080, "tls": { "enabled": true, "cert": "/etc/ssl/feather.pem" } },
"workers": [
{ "name": "thumbnails", "concurrency": 4 },
{ "name": "emails", "concurrency": 2 }
],
"allowed_origins": ["https://toolfeather.com", "http://localhost:3000"]
}title = "Feather API"
released = 2026-10-21
allowed_origins = ["https://toolfeather.com", "http://localhost:3000"]
[owner]
name = "Pratik"
[server]
host = "0.0.0.0"
port = 8080
[server.tls]
enabled = true
cert = "/etc/ssl/feather.pem"
[[workers]]
name = "thumbnails"
concurrency = 4
[[workers]]
name = "emails"
concurrency = 2This output was produced by the converter on this page with the default options — load it with the “App config” preset above and change any option to see the effect.
How JSON maps to TOML
| In JSON | Becomes in TOML |
|---|---|
"port": 8080 | port = 8080 |
Nested object "server": {…} | [server] section |
| Object inside object | [server.timeouts] |
| Array of objects | [[workers]] repeated per element |
"tags": ["a", "b"] | tags = ["a", "b"] |
"date": "2026-10-21" | date = 2026-10-21 (native date) |
"x": null | omitted, with a warning |
Key "my key" | "my key" = … (quoted key) |
Things that trip people up
- Nulls disappear. TOML has no null. If a missing key would change behaviour, replace null with an empty string, false or 0 before converting.
- Arrays mixing objects and values. TOML 1.0 allows mixed arrays, but a list like
[1, {"a": 2}]is written inline ([1, { a = 2 }]) rather than as an array of tables. - Very large integers. TOML integers are 64-bit. JSON numbers above 2⁶³ − 1 can't be written as TOML integers, so they're emitted as floats in exponent form (1e+20).
- Key order changes. Simple values are moved above sub-tables, because TOML requires it. The data is identical; only the order in the file differs from your JSON.
JSON vs TOML at a glance
| Property | JSON | TOML |
|---|---|---|
| Specification | RFC 8259 (2017) · ECMA-404 | TOML 1.0.0 (2021) |
| File extension | .json | .toml |
| Media type | application/json | application/toml |
| Data types | string, number, boolean, null, object, array | string, integer (64-bit), float, boolean, date-time, array, table |
| Comments | No | Yes # |
| Nesting | Unlimited | Tables and dotted keys |
- JSON: Numbers are parsed as IEEE-754 doubles in JavaScript, so integers above 9,007,199,254,740,991 (2⁵³ − 1) lose precision.
- TOML: There is no null in TOML, and the document root must be a table (key/value map), not an array.