JSON to TOML

Turn JSON into clean TOML tables and arrays of tables.

Runs in your browser Instant No sign-up
null values
JSON input
TOML
Reverse

Paste, type or drop a file — output appears as you type.

Waiting for input
Processed locally · nothing is uploadedProcessed locally

How to use the JSON to TOML converter

  1. Paste a JSON object into the left pane. The TOML appears as you type.
  2. null values: Leave out (the default) drops nulls and warns about them; Stop with an error refuses to convert while the JSON contains any null.
  3. Copy or Download the result as config.toml.

Invalid JSON is reported with its exact line and column before anything is converted.

Example

{
  "title": "Tidypane config",
  "server": { "host": "0.0.0.0", "port": 8080, "tls": false },
  "features": ["share-links", "pipelines"],
  "owners": [
    { "name": "Lan", "role": "admin" },
    { "name": "Minh", "role": "editor" }
  ]
}

becomes

title = "Tidypane config"
features = [ "share-links", "pipelines" ]

[server]
host = "0.0.0.0"
port = 8080
tls = false

[[owners]]
name = "Lan"
role = "admin"

[[owners]]
name = "Minh"
role = "editor"

How JSON maps to TOML

JSON TOML
nested object [table] section
array of objects [[array of tables]] blocks
array of strings or numbers inline array [ "a", "b" ]
string, number, boolean value with TOML quoting
null left out with a warning, or an error

Plain keys come first and tables follow, as TOML requires: once a [table] header starts, every later key belongs to that table.

Limits worth knowing

  • The top level must be an object. TOML documents are tables, so arrays or plain values at the root are rejected with an explanation.
  • No null. TOML deliberately has no null value, so the tool tells you which paths it dropped instead of silently losing them.
  • Strings stay strings. A JSON string like "2026-10-05" is written as a quoted string, not converted into a TOML date.

When to use it

  • Writing project files such as pyproject.toml, Cargo.toml, netlify.toml or Hugo configs from settings you already have as JSON.
  • Moving app configuration to TOML, which allows comments and is easier to edit by hand than JSON.
  • Checking what a TOML library will produce before committing a generated file, since TOML’s table ordering rules can be surprising.

The output is valid TOML 1.0: strings are quoted and escaped, keys that need it are quoted, and every table appears once.

Going the other way? Open TOML to JSON, or click Reverse. To produce YAML instead, use JSON to YAML, and for any other pair of formats try the Data Format Converter. If the JSON itself is broken, fix it first with JSON Repair.

Frequently asked questions

Why does it say the JSON must be an object?

A TOML document is always a table of key/value pairs, so the top level of the JSON has to be an object. A bare array, string or number has no TOML equivalent. Wrap it under a key, for example {"items": [...]}, and convert that.

What happens to null values?

TOML has no null. By default the tool leaves those keys and array items out and lists the first few paths in a warning, so you know exactly what was dropped. Set "null values" to "Stop with an error" if you would rather fix the JSON first.

How are arrays of objects written?

An array whose items are all objects becomes an array of tables ([[owners]] blocks), the idiomatic TOML form. Arrays of plain values such as strings or numbers are written inline, for example features = [ "share-links", "pipelines" ].

Are big integers kept exact?

Yes. The JSON is parsed losslessly, so integers beyond 2^53 are written to TOML with every digit, which matters for IDs. TOML integers are 64-bit, so values up to 9223372036854775807 are valid.

Is my JSON uploaded?

No. Conversion runs in your browser and nothing you paste leaves your device.

Last updated