About the TOML Validator
TOML looks forgiving until a build fails on a file that seemed fine. The usual culprits are structural rather than typographic: the same key assigned twice inside one table, a [table] header repeated further down the file, a header that clashes with a key already holding a plain value, or an inline table spread across two lines, which the specification forbids. This validator walks the whole document and reports the first of those with a line and column, so a Cargo.toml, a pyproject.toml or a Netlify config stops being a guessing game.
The value grammar is covered as well. Basic and literal strings are checked, in both single line and triple quoted forms, including the line ending backslash that folds a long basic string across several lines. Integers accept underscore separators and hexadecimal, octal and binary prefixes. Floats accept exponents plus inf and nan with a sign. Offset date-times, local date-times, dates and times are recognised and kept as written so no timezone is silently invented. Arrays may span lines and end with a trailing comma; inline tables may not.
Arrays of tables written with double brackets are assembled in order, so each [[servers]] block becomes another element rather than overwriting the last. When the file is valid the report counts tables, arrays of tables, key and value pairs and comments, and lists the top level keys. Switch Show to see the parsed structure as JSON, which is the fastest way to confirm that a nested header landed where you meant. To go from a YAML source instead, try YAML to TOML.
How to use
- Paste the TOML, or drop a
.tomlfile onto the left pane. - If an error appears, open the reported line and column in your editor and fix it there.
- Switch Show to JSON to inspect the structure the file actually produces.
Common questions
- Which TOML version is checked?
- The 1.0 grammar, including dotted keys, inline tables, arrays of tables, multi-line strings and the four date and time forms.
- Why is a repeated table header an error?
- TOML allows a table to be defined once. A second [table] header with the same name is a duplicate definition, and the specification requires a parser to reject it.
- Are dates converted to a timezone?
- No. Date and time values are kept as the exact text you wrote, so nothing is shifted or reinterpreted.
- Can an inline table span multiple lines?
- Not in TOML 1.0. Newlines are only permitted inside inline tables when they appear within a multi-line string value, so split the data into a normal table instead.