Read a TOML file, reformat it or convert it to JSON, with the date-time values and 64-bit integers that do not survive a JSON round trip flagged.
Waiting for TOML
A pyproject.toml, a Cargo.toml, a wrangler.toml — anything TOML.
The output appears here
Reformatted TOML, the same document as JSON, or every key with its line.
TOML has types JSON does not: an offset date-time is a real type here and a string there, and TOML integers are 64-bit where JavaScript numbers hold 53 bits exactly. Both are flagged above when your file contains them. Reformatting also goes through the parsed values, so comments do not survive it.
TOML Formatter runs entirely on your device — nothing is uploaded.
You’re on the Free plan. Compare plans
TOML is the configuration format for `pyproject.toml`, `Cargo.toml` and `wrangler.toml`, and it is strict in ways that catch people out — most often the rule forbidding a table from being defined twice, which is exactly what happens when a section header is repeated after a long file.
TOML has types JSON does not, and the conversion says which of yours are affected rather than leaving you to find out. An offset date-time is a first-class TOML type with no JSON equivalent, so converting one produces a string and converting back gives you a string rather than a date.
The integer case is worse and is flagged as an error rather than a note. TOML integers are 64-bit and JavaScript numbers hold 53 bits exactly, so a value past 2^53 has already lost precision by the time it is displayed. A tool that showed it without saying so would be handing you a number that is quietly wrong.
Reformatting goes through the parsed values, so comments do not survive it. The paths view is often the more useful one for a large file: every key with its line and its type, which is how you find the duplicate or the value that is a string where you expected a number.
Because TOML forbids it outright, to remove any question about which definition wins. It is the most common error in a hand-written file — a section header repeated hundreds of lines later, which a lenient reader merges and a strict one rejects.
Date-time types do not survive: TOML has them as real types and JSON does not, so they become strings and do not convert back. Integers past 2^53 lose precision, which is flagged as an error rather than a note.
TOML has an explicit type for every value and no significant whitespace, so it is harder to get wrong and more verbose for deep structures. YAML is terser and has several ways to read the same text. TOML is the better choice for a hand-edited configuration file for exactly that reason.
No. Reformatting parses the file and writes the values back out, and comments are not part of the parsed document.
`[[section]]` with double brackets, repeated to build a list of tables — how Cargo declares several binaries or pyproject several build targets. Single brackets define one table and repeating them is an error.