TOML → JSON
Converter
Convert between TOML and JSON for Cargo.toml, pyproject.toml, Hugo config, and Zola themes. Supports tables, dotted keys, inline tables, and arrays of tables. 100% client-side.
// JSON output will appear here…
About the TOML ↔ JSON Converter
TOML (Tom's Obvious Minimal Language) is the configuration format used by Rust's Cargo.toml, Python's pyproject.toml, Hugo, Zola, and many Go projects. This free online converter translates between TOML and JSON in both directions, handling tables, dotted keys, inline tables, and arrays of tables. Everything runs in your browser.
Supported Syntax
- Basic key/value pairs: strings, numbers, booleans, dates (as strings)
- Numeric formats: decimal, hex (
0x), octal (0o), binary (0b) - Underscores in numbers:
1_000_000 - Standard tables:
[database.primary] - Inline tables:
point = { x = 1, y = 2 } - Arrays of tables:
[[servers]](becomes a JSON array of objects) - Dotted keys:
a.b.c = 1 - Line comments with
#
Why Projects Chose TOML
TOML was designed to be unambiguous and friendly to humans editing it by hand. Unlike YAML, it has no indentation significance and no "Norway problem" — country = "NO" stays a string. Unlike JSON, it allows comments and multi-line strings.
Common Use Cases
- Convert
Cargo.tomlto JSON for CI pipelines or dashboards - Inspect
pyproject.tomldependencies programmatically - Migrate Hugo/Zola site configs between TOML and JSON
- Share settings between tools that speak only one format
Frequently Asked Questions
Does the converter support TOML 1.0 completely?
It supports the common 95% of TOML 1.0: tables, dotted keys, inline tables, arrays of tables, numeric literals with underscores, hex/octal/binary ints, and standard escape sequences in basic strings. Multi-line triple-quoted strings and offset date-times are passed through as strings.
How are datetimes handled?
TOML datetimes have no direct JSON representation, so they are preserved as ISO 8601 strings on both sides of the conversion. Date parsing in your target language can take over from there.
Is my config sent to a server?
No. Parsing and emitting both happen in your browser — safe for config files containing API keys, database credentials, or private tokens.
Related Tools
Convert the same data to YAML, CSV, or XML. Learn when to pick each format in the JSON vs YAML guide.
Bidirectional
Convert TOML to JSON and back without losing structure.
TOML 1.0 subset
Tables, dotted keys, inline tables, and arrays of tables all supported.
Fully private
Config files stay in your browser — never uploaded.