JSON to TOML Converter

Convert JSON configuration into TOML — the format used by Cargo.toml, pyproject.toml, Hugo, Netlify and many CLI tools.

The JSON root must be an object. Nested objects become [tables]; arrays of objects become [[arrays of tables]].
TOML output
Ctrl + Enter to run

Runs 100% in your browser — your data is never uploaded to our server.

How JSON maps to TOML

TOML (Tom’s Obvious, Minimal Language) is a configuration format designed to be easy to read and to map unambiguously to a hash table. Every TOML document is a table, so the JSON you convert must have an object at the root. The converter follows the TOML 1.0 specification:

JSONTOML
string, number, booleankey = "value", port = 8080, debug = false
nested objecta table header: [server], deeper levels as [server.timeouts]
array of valuesfeatures = ["refunds", "webhooks"]
array of objectsrepeated [[admins]] sections
object inside a mixed arrayinline table { name = "x" }
nullno equivalent — written as a comment so you can decide

Keys containing characters other than letters, digits, _ and - are quoted automatically, and strings are escaped as TOML basic strings.

How to use it

  1. Paste a JSON object or upload a .json file.
  2. Check the status bar for any null values that were commented out.
  3. Copy or download the .toml file.

Example

JSON

{
  "title": "App",
  "server": {"port": 8080},
  "admins": [{"name": "Asha"}, {"name": "Leo"}]
}

TOML

title = "App"

[server]
port = 8080

[[admins]]
name = "Asha"

[[admins]]
name = "Leo"

Frequently asked questions

Why do I get an error for a JSON array?

A TOML document must be a table (key/value pairs). Wrap the array in an object, e.g. {"items": [...]}.

What happens to null values?

TOML has no null type, so the key is written as a comment. Remove it or replace it with a default value.

Are dates converted to TOML datetimes?

JSON has no date type, so dates stay as quoted strings. Remove the quotes manually if you want native TOML datetimes.

Is my data uploaded?

No. Conversion runs in your browser.