JSON1 / TOML to JSON
TOML to JSON
Convert TOML to formatted JSON. Tables, table arrays, dotted keys, inline tables, and multi-line arrays are all supported.
Processed locally·Your data never leaves your device
InputTOML
ReadyOutputJSON
Converted output appears here as you type.
Good to know
- JSON has no date type, so TOML datetimes are kept as strings.
About this tool
Reading a TOML config as JSON is useful for inspecting what a tool will actually see, or for pulling values out of a Cargo.toml or pyproject.toml in a script that only handles JSON.
Tables, array-of-tables, dotted keys, inline tables, and arrays spread over several lines are all supported, including the nesting that TOML section headers imply.
- What happens to a TOML date?
- It stays a string. TOML has first-class datetime types and JSON has none, so
1979-05-27T07:32:00Zis preserved verbatim rather than converted into something lossy. - How does a dotted key convert?
- It becomes nesting:
owner.name = "Ada"produces anownerobject with anameinside, which is the same result as writing an[owner]section.