TOML to JSON converter
Paste a TOML file to get JSON you can read in any programming language. Dates are written as text exactly as they appear in the file.
Loading the tool…
Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.
How to use it
- Enter toml text and indentation.
- The result appears straight away and updates as you edit.
- Copy the result, or copy a link that keeps the same values to share it.
How it is calculated
The file is read per TOML 1.0: [a] tables, dotted keys a.b = 1, [[a]] arrays of tables, { } inline tables, all four string kinds, integers with underscores, 0x, 0o and 0b, floats and dates. Defining a key or table twice is rejected, then JSON is written with 2 or 4 space indentation.
Example
Inputs: Indentation = 2 spaces. Result: JSON: { "package": { "name": "demo", "version": "0.1.0", "authors": [ "Sara", "Omar" ] }, "server": { "host": "0.0.0.0", "port": 8080, "started": "2026-01-15T09:30:00Z" }, "users": [ { "name": "Ali", "admin": true }, { "name": "Mona", "admin": false } ] }.
# Project settings [package] name = "demo" version = "0.1.0" authors = ["Sara", "Omar"] [server] host = "0.0.0.0" port = 8080 started = 2026-01-15T09:30:00Z [[users]] name = "Ali" admin = true [[users]] name = "Mona" admin = false
{
"package": {
"name": "demo",
"version": "0.1.0",
"authors": [
"Sara",
"Omar"
]
},
"server": {
"host": "0.0.0.0",
"port": 8080,
"started": "2026-01-15T09:30:00Z"
},
"users": [
{
"name": "Ali",
"admin": true
},
{
"name": "Mona",
"admin": false
}
]
}Limits and caveats
- Comments are dropped because JSON has none.
- inf and nan have no JSON equivalent and give an error.
- Dates become strings in JSON.
Questions about this tool
Why does it say a table is already defined?
TOML does not allow the same table header twice. Put its keys under a single header.
How does [[products]] look in JSON?
It becomes an array of objects, with each [[products]] section as one item in order.
Does it accept name = demo without quotes?
No. Strings in TOML need quotes, and the tool shows the line with the problem.
