TOML to JSON Converter
Convert TOML to JSON and JSON to TOML instantly. Supports tables, arrays, inline tables, and all TOML data types. Free, browser-based, no upload required.
How to Use
- To convert TOML → JSON: paste your TOML into the left panel and click TOML → JSON.
- To convert JSON → TOML: paste your JSON into the right panel and click JSON → TOML.
- Use Ctrl+Enter (or Cmd+Enter on Mac) as a keyboard shortcut from whichever panel you’re editing.
- Click Copy on either panel to copy the result to your clipboard.
Worked Examples
Simple table
Input TOML:
[database]
host = “localhost”
port = 5432
enabled = true
Output JSON contains nested database object with host, port, and enabled fields.
Array of tables
TOML arrays of tables (using the double-bracket [[table]] syntax) become JSON arrays of objects. For example, two [[fruits]] table entries convert to a fruits array containing two objects.
TOML vs JSON
TOML (Tom’s Obvious Minimal Language) is a configuration file format designed to be easy to read due to its obvious semantics.
It is widely used in Rust projects (Cargo.toml), Hugo, and many other tools.
JSON is the standard data interchange format for APIs and web services.
This tool converts between them losslessly for data types common to both formats.
FAQ
What TOML features are supported?
All standard TOML v1.0 features are supported via the smol-toml library: tables, arrays of tables, inline tables, dotted keys, multi-line strings, integers, floats, booleans, datetimes, and arrays.
Can JSON arrays of objects be converted to TOML?
Yes. JSON arrays of objects become TOML arrays of tables ([[table.name]] syntax). Primitive arrays become TOML inline arrays.
What happens to JSON null values?
TOML does not have a null type. JSON null values cannot be represented in TOML and will cause a conversion error. Remove or replace null values before converting.
Is my data sent anywhere?
No. All conversion runs 100% in your browser. Your data never leaves your machine.