TOML Validator
Paste or type TOML to instantly validate and parse it. Errors show exact line and column numbers.
Common TOML Mistakes
- × Duplicate keys — each key must be unique within a table.
- × Mixed array types — all elements in an array must be the same type.
- × Missing quotes on strings — bare values like
hello worldare invalid; use"hello world". - × Redefining a table — you can't define
[section]more than once.
TOML Quick Reference
- · Tables —
[section]starts a new table. - · Array of tables —
[[items]]creates an array of table objects. - · Multiline strings — use triple quotes
"""...""". - · Dates — ISO 8601 format is natively supported:
2024-01-15T10:30:00Z.
Frequently Asked Questions
What is TOML?
TOML (Tom's Obvious, Minimal Language) is a configuration file format designed to be easy to read. It's used by Rust's Cargo.toml, Python's pyproject.toml, Hugo, and many other tools.
Why does the output show JSON?
The parsed TOML is displayed as JSON so you can see exactly how the data was interpreted — types, nested tables, arrays of tables, and date values all become visible.
What's the difference between [table] and [[table]]?
[table] defines a single object. [[table]] (double brackets) defines an element in an array of objects — each occurrence appends a new entry to the array.
Is my data sent anywhere?
No — all validation and parsing happens entirely in your browser. Nothing is sent to any server.
About TOML Validator
The TOML Validator is a free online tool that parses and validates TOML configuration files in real time, reporting syntax errors with precise line and column numbers and displaying the parsed result as formatted JSON for easy inspection.
- Real-time validation as you type with 300 ms debounce
- Exact error location — line and column number shown in the editor
- Context snippet displaying lines surrounding the error
- Parsed output shown as formatted JSON to reveal data types
- Supports tables, arrays of tables, inline tables, and ISO 8601 dates
- 100% client-side — your config files never leave your browser
How to Validate TOML Online
- 1
Paste or type your TOML
Paste the contents of your
.tomlfile into the left editor, or click "Sample TOML" to load an example. - 2
Check the status banner
The banner below the editors turns green for valid TOML or red for invalid TOML with the exact line and column of the error.
- 3
Use the context snippet to fix errors
When invalid, the right panel shows the error message and a context snippet of the lines around the problem to help you locate it quickly.
- 4
Inspect the parsed JSON output
Once valid, the right panel shows the full parsed data as formatted JSON. Click "Copy" to copy it to your clipboard.
Tip: Load the sample TOML to explore arrays of tables ([[users]]), nested tables, and mixed value types before pasting your own config.
Common Use Cases
Rust & Cargo
- • Validate
Cargo.tomldependencies and metadata - • Check workspace member configurations
- • Debug feature flag and target sections
Python Projects
- • Validate
pyproject.tomlfor Poetry or pip - • Check tool configurations like
[tool.black] - • Verify dependency groups and optional extras
Static Site Generators
- • Validate Hugo
config.tomlbefore building - • Check Zola and Cobalt site configurations
- • Debug taxonomy and menu definitions
Application Config
- • Validate server and database config files
- • Check Gitea, Forgejo, and Woodpecker CI configs
- • Inspect Prometheus alerting rule TOML files
TOML to JSON Conversion
- • Quickly convert TOML config to JSON format
- • Inspect how TOML types map to JSON equivalents
- • Verify date/time values parse correctly
Learning TOML
- • Experiment with tables vs arrays of tables
- • Understand inline table and multiline string syntax
- • See how TOML dates and booleans are represented
More TOML Questions Answered
How does TOML differ from YAML and JSON?
TOML is designed specifically for configuration files. Unlike YAML it has no significant whitespace or indentation rules, making it less error-prone. Unlike JSON it supports comments, multi-line strings, and native date/time types. It maps unambiguously to a hash table.
Why can't I use the same key twice in TOML?
TOML requires all keys within a table to be unique. Duplicate keys are a hard syntax error. If you need multiple values, use an array: tags = ["web", "api"] or an array of tables with [[items]].
What is an inline table in TOML?
An inline table is a compact single-line table syntax: point = {x = 1, y = 2}. It is equivalent to a full [point] table but must fit on one line and cannot be extended after definition.
Does TOML support comments?
Yes — TOML uses # for line comments, which is one of its advantages over JSON. Comments can appear on their own line or after a key-value pair.
What date and time formats does TOML support?
TOML natively supports ISO 8601 offset date-times (1979-05-27T07:32:00Z), local date-times, local dates, and local times. These are first-class types — not just strings — and appear as date objects in the parsed JSON output.
Can I use this tool to validate Cargo.toml files?
Yes. Paste your Cargo.toml contents directly into the editor. The validator will check the TOML syntax and show the parsed structure. Note that it does not verify Cargo-specific semantics (e.g., whether a crate name exists on crates.io).
Is my TOML config safe to paste here?
Yes. All validation and parsing runs entirely in your browser using the smol-toml library. Nothing is transmitted to any server, logged, or stored. You can safely paste private configuration files.