TOML Validator

Validate TOML syntax: structure, comments, key/value errors and duplicate keys.

  • Runs locally in your browser
  • No upload required

Try it

Valid
yes
Tables
1
Keys
2

Supported formats

Input
text
Output
boolean, number, text

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

Valid TOML: 1 table(s), 2 key(s).

How it works

  • Scanned line by line, ignoring `#` comments and blank lines.
  • Recognised table headers, key/value pairs and multi-line strings.
  • Tracked duplicate keys and unterminated strings, arrays or inline tables.
  • This is a pragmatic structural validator, not a full TOML parser: it reports the common syntax and structure errors and their location.
  • Values are not type-checked against their TOML types beyond basic quoting; it is a syntax check, not a schema check.

Methodology

  1. Strip comments with quote awareness.
  2. Track multi-line strings, tables and inline/array nesting.
  3. Detect duplicate keys and report unterminated constructs with their starting line.

Usage

  1. Paste TOML content.
  2. Read the errors with their line and column.
  3. Fix and re-validate until the file is valid.

Examples

These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.

Valid document

jsonSelect to copy
{
  "content": "title = \"Example\"\n[server]\nport = 8080"
}

Duplicate key

jsonSelect to copy
{
  "content": "name = \"a\"\nname = \"b\""
}

Unterminated string

jsonSelect to copy
{
  "content": "name = \"unterminated"
}

Limitations

What TOML is used for

TOML is a minimal configuration format used by Rust's Cargo, Python's pyproject and many build tools. It is line-oriented, so a single bad key or an unterminated string invalidates the whole file.

This validator reports the location of those faults so you can fix them quickly. It is a syntax check; run the consuming tool to enforce the schema your project expects.

Frequently asked questions

Is this a full TOML parser?
No. It is a structural syntax validator that catches the common errors and points at their line and column; for strict conformance use a reference parser in your build.
Does it check value types?
Only lightly. It verifies quoting and structure, not that a value matches an expected integer, date or enum.

Sources

  1. TOML v1.0.0: Specification — TOML
  2. RFC 8259: JSON (for format comparison) — IETF