JSON to TOML Converter: Config File Guide (and Why Numbers Look Like 3_000)
Convert JSON to TOML for configuration files and tooling. Learn how TOML differs from JSON, how arrays and nested objects map, and why TOML may format numbers with underscores.
TOML (Tom’s Obvious Minimal Language) is widely used for configuration:
- Rust tooling (
Cargo.toml) - Static site generators
- CI and developer tools
If your data starts as JSON (API output, app configs, generated settings), it’s often useful to convert it into TOML.
Use our JSON to TOML converter to generate a clean TOML config instantly.
Quick example: JSON → TOML
JSON input
json{
"app": {
"name": "demo-web",
"env": "production",
"port": 8080,
"features": ["markdown_export", "xml_import"]
},
"database": {
"host": "localhost",
"port": 5432,
"user": "demo",
"ssl": false
}
}TOML output
toml[app]
name = "demo-web"
env = "production"
port = 8_080
features = ["markdown_export", "xml_import"]
[database]
host = "localhost"
port = 5_432
user = "demo"
ssl = falseWhy does TOML sometimes format numbers like 3_000?
TOML allows underscores in numbers as visual separators.
3000and3_000are the same value- It’s similar to numeric separators in many programming languages
So if you see 8_080 or 5_000, that’s valid TOML and will parse correctly.
Step-by-step: how to convert JSON to TOML
- Open JSON to TOML
- Paste JSON input (or click Sample)
- Copy or download the TOML output
How JSON maps to TOML
Objects → Tables
json{ "app": { "name": "demo" } }becomes:
toml[app]
name = "demo"Nested objects → Dotted tables
json{ "app": { "features": { "beta": true } } }becomes:
toml[app.features]
beta = trueArrays → Arrays
json{ "features": ["a", "b"] }becomes:
tomlfeatures = ["a", "b"]Convert back when needed
If you need JSON again (for APIs or scripts), use TOML to JSON.
Privacy
The conversion runs in your browser. Your data is not uploaded.
Try it now
- Convert JSON to TOML: JSON to TOML
- Convert TOML to JSON: TOML to JSON