TOML to JSON Converter
Convert and validate TOML and JSON in both directions with nested tables and arrays
The converted and syntax-validated result will appear here.
About this tool
TOML to JSON Converter parses TOML 1.1 configuration into formatted JSON and serializes JSON objects back to TOML. It supports nested tables, arrays of tables, quoted keys, multiline strings, dates, booleans, and numeric values through the smol-toml parser rather than a line-based approximation. TOML integers outside JavaScript's safe numeric range can be preserved as decimal strings because standard JSON has no BigInt type. JSON-to-TOML mode requires an object root and rejects values TOML cannot represent, including null array elements. Comments and original formatting are not preserved during semantic conversion.
Scenario Recipes
Move an application config into a JSON-based pipeline
Goal: Convert values accurately without treating TOML as simple key-value text
- Paste the TOML and convert it with large-integer preservation enabled.
- Review dates, nested tables, arrays, and any BigInt-to-string count in the result.
- Validate the JSON against the consuming system's schema before replacing the original configuration.
Result: A syntax-validated JSON document with explicit handling for TOML-only data types.
Frequently Asked Questions
Does it support nested TOML tables and arrays of tables?
Yes. A TOML 1.1 parser handles nested tables, dotted keys, arrays, inline tables, and arrays of tables.
What happens to TOML dates?
TOML date and time values are emitted as ISO-style JSON strings because JSON has no native date type.
How are integers larger than 53 bits handled?
They can be parsed as BigInt and emitted as decimal strings to avoid precision loss in standard JSON.
Can any JSON value be converted to TOML?
No. The root must be an object, and null values or mixed arrays may be rejected because TOML cannot represent them directly.
Are TOML comments preserved?
No. This is a semantic format conversion; comments, whitespace choices, and key ordering details may change.
Is the configuration uploaded?
No. Parsing, validation, serialization, and downloads happen locally in the browser.
Keep browsing