JSON to TOML Converter

Convert JSON into clean TOML config syntax.

Ad placeholder (leaderboard)

Convert JSON to TOML in your browser

TOML is the config format behind Cargo.toml, pyproject.toml and many other tools, but data often arrives as JSON. This converter turns a valid JSON object into clean TOML that targets the TOML v1.0.0 syntax, so you can paste it straight into a config file.

How it works

The converter maps each JSON construct to its TOML equivalent:

JSONTOML
nested object[table] header with dotted path
array of objects[[array of tables]] entries
array of scalarsinline array, e.g. tags = ["a", "b"]
stringbasic-string quoting with escapes
number / booleanwritten as-is
nullempty string (TOML has no null)

Keys that are not bare-key safe (containing spaces or special characters) are quoted automatically. TOML requires an object at the top level, so the input must be a JSON object.

Example

This JSON:

{ "name": "demo", "deps": { "serde": "1.0" }, "tags": ["fast", "free"] }

becomes:

name = "demo"
tags = ["fast", "free"]

[deps]
serde = "1.0"

The scalar array stayed inline, and the nested deps object became a [deps] table. The conversion happens entirely in your browser — your config is never uploaded or stored.

Ad placeholder (rectangle)