JSON ↔ TOML Converter
Convert between JSON and TOML — locally, instantly. Root must be an object.
What is TOML?
TOML (Tom's Obvious Minimal Language) was designed for config files that humans edit directly. It's more explicit than YAML, avoids YAML's ambiguities, and maps cleanly to hash tables (objects). Used heavily in Rust projects (Cargo.toml), Python packaging (pyproject.toml), and Hugo site configs.
Input
{"database":{"host":"localhost","port":5432,"name":"mydb"},"server":{"host":"0.0.0.0","port":8080}}Output
[database] host = "localhost" port = 5432 name = "mydb" [server] host = "0.0.0.0" port = 8080
What TOML Can and Cannot Express
| JSON type | TOML equivalent | Notes |
|---|---|---|
| String | key = "value" | Always double-quoted |
| Integer | key = 42 | No quotes |
| Float | key = 3.14 | No quotes |
| Boolean | key = true | Lowercase; no quotes |
| Array of scalars | key = [1, 2, 3] | Inline array syntax |
| Object | [section] | Section header |
| Nested object | [a.b] | Dotted section path |
| Array of objects | [[items]] | Array of tables syntax |
| null | ❌ Not supported | TOML has no null type |
Warning: JSON
null has no TOML equivalent. If your JSON contains null values, the conversion will fail. Replace nulls with a sentinel value (0, "", false) before converting.Frequently Asked Questions
Your files stay on your computer. Dad promised.