Tools

Home
JSON FormatterSQL FormatterJS ValidatorMinify CSS
Merge PDFCompress PDFImage to PDF
JPG to PNGPNG to WebPCrop Image

TOML Syntax Checker & Validator

Paste TOML to validate syntax, find errors with line numbers, and view parsed output as JSON

Your files never leave your browser
Input (TOML)0 chars, 0 lines
Output (JSON)
Ready·

Paste any TOML config — Cargo.toml, pyproject.toml, Hugo settings, whatever — and get instant validation with line-number errors or clean JSON output you can copy. No vague "invalid syntax" messages; the parser tells you exactly what broke and where. And everything runs in your browser. Nothing gets uploaded.

How It Works

Paste TOML
→
Parse & Validate
→
JSON Output or Error

The parser reads your TOML line by line — checking table headers, key-value pairs, strings, numbers, dates, arrays, and inline tables against the TOML spec. Valid input gets converted to a JSON tree you can copy or download. Invalid input gets a specific error pointing to the exact line and character that broke things.

Examples

Basic Cargo.toml Validation

Checking a Rust package manifest before publishing to crates.io.

INPUT
[package] name = "my-cli" version = "0.3.1" edition = "2021" [dependencies] clap = { version = "4.5", features = ["derive"] } serde = "1.0"
OUTPUT
✅ Valid TOML { "package": { "name": "my-cli", "version": "0.3.1", "edition": "2021" }, "dependencies": { ... } }

Catching a Missing Quote

A string value without a closing quote — easy to miss in a long config file.

INPUT
[server] host = "localhost port = 8080
OUTPUT
❌ Error (line 2): Unterminated string

pyproject.toml with Nested Tables and Arrays

A real Python project config with build system settings, optional dependencies, and tool configuration — the kind of file where one wrong bracket breaks pip install.

INPUT
[build-system] requires = ["setuptools>=68.0"] build-backend = "setuptools.build_meta" [project] name = "dataprep" version = "2.1.0" requires-python = ">=3.9" [tool.pytest.ini_options] testpaths = ["tests"] addopts = "-v --tb=short"
OUTPUT
✅ Valid TOML { "build-system": { "requires": ["setuptools>=68.0"], "build-backend": "..." }, "project": { ... }, "tool": { "pytest": { "ini_options": { ... } } } }

Who Uses This

🦀 Rust Developers

Validating Cargo.toml before pushing — catching dependency format issues early.

🐍 Python Developers

Checking pyproject.toml configs so pip and build tools don’t choke on bad syntax.

⚙️ DevOps Engineers

Verifying deployment configs (Hugo, Netlify, Deno) before they hit CI/CD pipelines.

📚 Students

Learning TOML syntax and seeing exactly how it maps to JSON data structures.

Common Mistakes

Using tabs for indentation inside inline tables

TOML doesn’t care about indentation for structure (it’s not YAML), but mixing tabs and spaces inside inline tables can cause confusing parse errors. Stick with spaces.

Redefining a key that already exists in the same table

Writing name = "foo" twice under [package] is invalid TOML. Unlike JSON (which silently uses the last value), TOML treats duplicate keys as an error. Remove or rename the duplicate.

Forgetting quotes around dotted keys with special characters

Bare keys only allow letters, numbers, dashes, and underscores. Something like server.my host = "x" needs to be server."my host" = "x".

Confusing TOML arrays of tables with regular tables

[[items]] (double brackets) creates an array entry. [items] (single brackets) creates a single table. Mixing them up for the same key throws a type mismatch error.

Technical Details

Frequently Asked Questions

What is TOML and how is it different from YAML or JSON?

TOML is a config file format that maps directly to a hash table. Unlike YAML, indentation doesn’t matter — structure comes from explicit table headers like [database]. Compared to JSON, TOML supports comments, doesn’t need commas everywhere, and is genuinely readable in a text editor. Most people pick it when YAML feels too fragile and JSON feels too noisy.

How do I validate a TOML file online?

Paste your TOML into the input box and click Validate. If the syntax is correct, you’ll see the parsed JSON on the right. If there’s an error, you get the line number and a description of what went wrong. The whole thing runs in your browser — no file upload needed.

Why does my TOML file show "duplicate key" error?

TOML doesn’t allow the same key twice in one table. If you have name = "a" and name = "b" under the same [section], that’s invalid. Either remove the duplicate or put them in separate tables. This is actually a feature — it prevents accidental overwrites that JSON allows silently.

Can I convert TOML to JSON with this tool?

Yes. When your TOML validates successfully, the right panel shows the equivalent JSON. You can copy it to your clipboard or download it as a .json file. It’s an accurate structural conversion — arrays stay arrays, tables become objects, and all data types are preserved.

Is it safe to paste config files with passwords or API keys?

Your data stays on your machine. The parser runs entirely in JavaScript inside your browser — no server requests, no logging, no analytics on the content. You can disconnect from the internet and the tool still works. That said, it is still a good habit to keep secrets out of config files entirely and use environment variables instead.

Share: