TOML Viewer & Validator
Validate TOML config files and see their structure as a tree.
How to use the TOML Viewer & Validator
- 1Drop a .toml file such as Cargo.toml or pyproject.toml, or paste it.
- 2Syntax errors are shown at the exact line.
- 3Explore tables and arrays as a tree and copy the data as JSON.
About TOML Viewer & Validator
The TOML Viewer & Validator parses TOML configuration files and reports syntax errors at the exact line, for example a missing quote, a duplicate key or a table defined twice. Fix the problem in the editor and the check runs again as you type.
Once the file is valid, the TOML viewer shows tables, arrays of tables, inline tables and values as a collapsible tree, with dates and times recognized as their own type. The status bar counts the top-level keys and values. Copy as JSON gives you the same data as JSON, which helps when you want to see how a tool will read your config or need to reuse the values elsewhere. Format rewrites the file in a consistent layout; note that this removes comments.
TOML is the config format of Rust's Cargo.toml, Python's pyproject.toml and many other tools, so this TOML validator is useful for developers who edit dependencies, build settings or tool options by hand. Drop a file, paste a snippet from documentation, or load the built-in example to see how the tree view works.
Frequently asked questions
What is TOML used for?
TOML (Tom's Obvious Minimal Language) is a configuration format designed to be easy to read. Well-known examples are Cargo.toml for Rust projects and pyproject.toml for Python packaging.
How do I convert TOML to JSON?
Open the file and use Copy as JSON once it has no errors. Tables become JSON objects, arrays stay arrays, and date-time values are written as strings, since JSON has no date type.
Does formatting keep my comments?
No. Format rebuilds the file from the parsed data, so comments are dropped. Copy the original first if you want to keep them.
What is the difference between [table] and [[table]] in TOML?
Single brackets define one table. Double brackets define an array of tables: each [[name]] header adds a new entry to the array, which is how Cargo.toml lists several [[bin]] targets, for example.
More in File Viewers
Drop any file to look inside it, with the right viewer picked for you.
Browse JSON as a collapsible tree and find syntax errors down to the line.
Check YAML for indentation and syntax errors and explore it as a tree.