TOML Validator
Paste TOML and get instant validation. If valid, you see the parsed structure as JSON; if invalid, you get the line and message of the first error.
Last updated: May 27, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is TOML Validator?
TOML is a configuration file format favored by Cargo, Poetry, Hugo, and many other tools. Its strict-but-readable rules make it easy to write by hand, but small mistakes — a missing equals sign, an unquoted special character, an unintended duplicate key — are common. A validator catches them before you run your build.
This tool parses TOML 1.0 (the current stable spec): bare and quoted keys, dotted keys, tables, arrays of tables, inline tables, basic strings, literal strings, multi-line strings, integers (decimal/hex/octal/binary), floats, booleans, and date-time literals. When validation succeeds, the parsed structure is shown as JSON so you can see exactly how the parser interpreted your input.
How to Use TOML Validator
Paste TOML into the input panel.
Validation runs as you type.
If valid, the parsed JSON appears on the right.
If invalid, the line and message of the error appear instead.
Common Use Cases
- Verifying a Cargo.toml or pyproject.toml before committing.
- Catching duplicate-key or duplicate-table errors that Cargo would reject.
- Inspecting how a TOML parser will interpret a tricky multi-line string.
- Debugging unexpected nesting in a TOML config.
Example Input and Output
A simple TOML document parses to a JSON object.
title = "Example"
[server]
port = 8080{
"title": "Example",
"server": {
"port": 8080
}
}Privacy
All TOML parsing happens in your browser. No content is sent to a server.
Dates
TOML datetime literals are preserved as ISO-8601 strings in the JSON view since JSON has no native datetime type.
inf and nan
TOML 1.0 supports inf, +inf, -inf, and nan numeric literals. Since JSON does not, the JSON view renders them as strings "Infinity", "-Infinity", and "NaN".
Frequently Asked Questions
Which TOML version does this support?
TOML 1.0 (the current stable specification). Most TOML features are supported, including tables, arrays of tables, inline tables, multi-line strings, and all numeric literals.
Does it validate semantic constraints?
Yes for structural constraints: duplicate keys, redefined tables, and conflicting types are caught. Application-level constraints (e.g. "port must be in 1-65535") are not part of TOML and need a separate schema check.
Why is the parsed view shown as JSON?
JSON is the lingua franca for "show me a parsed structure". TOML and JSON map cleanly onto each other (TOML adds dates, JSON adds null), so the JSON view shows you exactly what your TOML produced.
Does this send my TOML anywhere?
No. All parsing happens locally in your browser.
Related Tools
JSON to TOML Converter
Convert JSON to TOML 1.0 — table headers for nested objects, [[array of tables]] for arrays of objects, inline tables for short structures, and proper key quoting.
JSON Validator
Validate JSON syntax online. Shows valid/invalid status, error location (line and column), and structure stats including type, key count, and depth.
YAML Beautifier
Format and prettify YAML with configurable indentation and optional key sorting. Validates YAML syntax instantly.
JSON Formatter
Format, validate, and beautify JSON instantly — with clear error messages, Tree View, Diff mode, and Schema validation.
XML Beautifier
Format and prettify minified or messy XML with configurable indentation. Also minify XML to remove whitespace.
JSON Fixer
Fix broken or invalid JSON automatically. Repairs trailing commas, single quotes, bare keys, Python literals, and JavaScript comments.

