TOML to JSON
Convert a TOML config file into JSON.
Everything runs inside your browser. Your files never leave your device.
Input
Result
Ask about TOML to JSON
Questions about what this tool does, which option to pick, or what it can and cannot handle.
The question you type here is sent to an AI provider to be answered — your files and whatever you put in the tool above are not, and the assistant cannot see them. Answers are generated and can be wrong. The tool itself is not guessing: it runs deterministic code on your device.
About the TOML to JSON
TOML is a configuration format designed to be read and edited by people, which is why Rust's Cargo, Python's packaging tooling and a growing number of other projects use it. This converts a TOML document into JSON, which is what most code wants to work with.
The conversion is more direct than it is for XML, because TOML and JSON model very nearly the same things: tables become objects, arrays become arrays, and TOML's types map onto JSON's cleanly enough.
Three details do not survive the trip. TOML has genuine date and time types — a datetime written without quotes is a datetime, not a string — and JSON has no such type, so they become strings in the RFC 3339 form. TOML distinguishes integers from floats and JSON has one number type, so the distinction is lost. And TOML files are usually full of comments, which is a large part of why the format was chosen, and JSON has no comments at all so they are dropped.
Table syntax is where people misread TOML rather than where the conversion goes wrong. A section header in square brackets creates a table, and a doubled bracket creates an element of an array of tables — so repeating [[dependencies]] builds a list while repeating [dependencies] is an error. Seeing the JSON makes the resulting structure obvious in a way that reading the TOML sometimes does not.
Dotted keys behave the same way: a key written as owner.name creates a nested object rather than a key containing a full stop, which is another thing the JSON output makes immediately visible.
How to use it
- 1Paste the TOML document — a Cargo.toml, a pyproject.toml, or any configuration file.
- 2Read the JSON structure, which shows what the table syntax actually built.
- 3Check any dates, which become RFC 3339 strings since JSON has no date type.
- 4Note that comments are gone, since JSON has no way to carry them.
Questions
- What happens to my comments?
- They are dropped. JSON has no comment syntax, and comments are frequently the reason a project chose TOML in the first place, so keep the TOML as the source of truth and treat the JSON as derived.
- How are dates handled?
- TOML has real date and time types; JSON does not. They become RFC 3339 strings, which is the conventional representation and what most parsers on the other side will expect.
- What is the difference between one bracket and two?
- A single pair defines a table. A doubled pair defines an element of an array of tables, so repeating it builds a list. Repeating a single-bracket header instead is an error, and the JSON output makes which one you wrote immediately obvious.
- Are integers and floats distinguished?
- Not after conversion. TOML separates them; JSON has a single number type. A value written as 1.0 in TOML may come back as 1 depending on how the JSON is later serialised.

