Input
Ready
Lines: 0
Words: 0
Chars: 0
Size: 0 KB
Input statistics are available via the Stats button above this field.
Output
Lines: 0
Words: 0
Chars: 0
Size: 0 KB
Output statistics are available via the Stats button above this field.
Results are provided for informational purposes only and may contain errors. Please verify important information independently. Use of this tool is at your own risk.
What the TOML Validator does
The TOML Validator parses your file against the TOML specification and reports the first error with its line and column. It catches unquoted strings, duplicate keys, invalid dates and keys that appear in the wrong table.
TOML is strict about types: text must be quoted, while numbers, booleans and dates must not be. That is why version = 0.1.0 is an error and version = "0.1.0" is correct.
When to use it
- Checking a Cargo.toml, pyproject.toml, netlify.toml or Hugo configuration before committing it.
- A build tool reports a TOML parse error and you want the exact position.
- Converting TOML to another format afterwards with the Data Converter, which uses the same parser.
- Reviewing a teammate's configuration change in a pull request when the build log only says the file is invalid.
Worked example
Input
[package]
name = "demo"
version = 0.1.0
Output
Unexpected character, expected only whitespace or comments till end of line at row 3, col 14, pos 38:
2: name = "demo"
3> version = 0.1.0
^
(Line 3, Column 14)
Suggestion: Check that string values are quoted, and that [table] headers are declared before the keys that belong to them.Common questions about the TOML Validator
Why is version = 0.1.0 invalid?
A value with two dots is neither a number nor a date in TOML, and unquoted text is not allowed. Quote it as a string: version = "0.1.0".
Can I define the same table twice?
No. Each [table] can be defined only once, and a key cannot be set twice in the same table. Use [[array.of.tables]] when you need several entries with the same name.
Which TOML features are supported?
Tables, inline tables, arrays of tables, multi-line strings, integers in hex, octal and binary, and offset date-times all parse correctly, which covers typical Cargo, Poetry, Hugo and Netlify files.
Is this tool free?
Yes, it's free to use. No signup, no email required. Get results on this page.
How do I get my result?
Use the tool on this page. Your result appears here; no email delivery is required.