TOML to JSON Conversion
Input
[database]
server = "192.168.1.1"
ports = [ 8001, 8002 ]
enabled = trueExample output
{
"database": {
"server": "192.168.1.1",
"ports": [
8001,
8002
],
"enabled": true
}
}Convert bi-directionally between TOML configuration files (such as Cargo.toml and pyproject.toml) and structured JSON documents. Features 2- or 4-space formatting, recursive key sorting, and instant client-side execution.
| Operations | TOML to JSON (default) and JSON to TOML |
|---|---|
| Formatting Options | 2 or 4 spaces indentation with optional recursive key sorting |
| Parser Engine | smol-toml TOML v1.0.0 compliant parser in Web Worker |
| Maximum Input | 5 MB |
| Execution Deadline | 3 s |
Input
[database]
server = "192.168.1.1"
ports = [ 8001, 8002 ]
enabled = trueExample output
{
"database": {
"server": "192.168.1.1",
"ports": [
8001,
8002
],
"enabled": true
}
}Input
{
"database": {
"server": "192.168.1.1",
"enabled": true
}
}Example output
[database]
server = "192.168.1.1"
enabled = trueTOML specifications mandate that the root of a document must be a table (key-value mapping). Bare JSON arrays or primitive values cannot be directly represented as root TOML documents.
TOML comments are not preserved when translating into JSON, as the JSON specification does not define a standard comment syntax.
Standard RFC 3339 date-time values are parsed and represented as ISO 8601 strings in JSON.
TOML Formatter
Format, validate, and beautify TOML configuration files locally in your browser.
JSON Formatter
Prettify, indent, and format JSON strings with customizable indentation and key sorting.
JSON ↔ YAML Converter
Convert bi-directionally between JSON and YAML with strict alias and cycle protection, custom indentation, and swap support.
Yes. Standard Rust Cargo.toml, Python pyproject.toml, and any TOML v1.0.0 configuration can be seamlessly converted to and from JSON.
Yes. Everything runs 100% locally in your browser's Web Worker. You can disconnect your network and the tool will continue working perfectly.
Yes. Inline tables, nested tables ([table.subtable]), and arrays of tables ([[array_of_tables]]) are fully supported.