TOML to JSON
This TOML to JSON converter turns TOML files such as Cargo.toml and application config into standard JSON instantly. Tables and array tables are expanded automatically, dates become ISO strings and integers outside the safe range are flagged. Computation runs locally in your browser and the config never leaves your machine.
How to use it
- 1
Paste your TOML
Paste TOML config text; [section] headers, key-value pairs and [[array]] tables are all supported.
- 2
Handle the type hints
If the input contains an integer literal beyond 2^53, the tool suggests using a string to avoid losing precision.
- 3
Copy the JSON
Choose the JSON indentation and copy, or use the ⇄ button to convert back to TOML.
- 4
Use it downstream
Feed the JSON into a tool on this site or into your application code.
Key features
Full table structure restored
Dotted headers such as [server.host] and array tables such as [[products]] are restored accurately into nested objects and arrays of objects.
Safe date handling
TOML date-times have no matching JSON type, so they are uniformly converted to ISO 8601 strings for predictable behaviour.
Big-integer protection
Values beyond the JSON safe integer range (±2^53) are not forced into a lossy number; the tool clearly reports them instead.
Line and column errors
Missing quotes, missing equals signs and invalid values are located by line and column with a clear explanation.
Array tables handled
Each [[products]] block becomes an object in the products array, with its keys as fields.
Local and private
Parsing happens in your browser and the config is not uploaded.
Common errors & troubleshooting
- ! TOML strings must be quoted: host = localhost is invalid and should be host = "localhost".
- ! Comments start with # and are not preserved after conversion, since JSON has no comment syntax.
- ! Tables must be defined after all their key-value pairs; do not interleave the keys of one table inside another [section].
- ! Array tables are order-preserving, so the element order in the resulting array matches the file.
Frequently asked questions
What does a TOML date become in JSON?
An ISO 8601 string (for example 2026-01-01T00:00:00.000Z). JSON has no date type, and the string form can be read losslessly by any language — parse it into a Date object in your business code when needed.
Why is a large integer reported as an error?
For example 9007199254740993 exceeds the JSON safe integer limit of 2^53-1, so converting it to a JSON number would lose precision. The tool suggests writing it as a string to prevent data errors at the source.
How is an array table like [[products]] converted?
Each [[products]] block becomes an object in the products array, and the key-value pairs inside become that object fields, with the nested structure restored automatically.
Is my config uploaded?
No. Conversion happens locally in your browser.
Related tools
JSON to TOML
Convert JSON to clear, semantic TOML config. Nested objects become [section] tables and object arrays become [[array]] tables. Data TOML cannot express, such as null or an array root, is flagged with its field path.
YAML to JSON
Convert YAML to JSON online. Anchors, merge keys and flow syntax are expanded and parsed under the YAML 1.2 core schema, avoiding implicit-type traps such as yes/no and dates. Runs locally.
JSON Formatter
Format, beautify and validate JSON in your browser. Errors point to the exact line and column, and you can indent with 2 spaces, 4 spaces or a tab.
JSON to YAML
Convert JSON to YAML while keeping the original structure, in a format that is easier to read and comment. Conversion errors point to the source position.