TOML Formatter & Validator.
Validate TOML 1.0 with exact line and column errors and tidy its layout while keeping every comment.
Runs in your browserAbout TOML Formatter & Validator
The TOML Formatter & Validator parses your file with a complete TOML 1.0 parser and tells you exactly where it breaks. Beyond plain syntax errors it catches the semantic ones that many quick checkers miss: a key defined twice, a [table] header repeated, a table that was first created with dotted keys and then redefined with a header, an integer that does not fit in 64 bits, an invalid date such as 2025-02-30, and the TOML 1.0 rule that inline tables may not have a trailing comma or span several lines. When the file is valid, the formatter tidies it without moving anything around: one space on each side of "=", a blank line before every [table] and [[array of tables]], arrays either on one line or with one item per line and a trailing comma, and inline tables written as { a = 1, b = 2 }. Comments stay where you put them, including comments inside multi-line arrays, and strings, numbers and dates are copied exactly as written, so 0xDEAD_BEEF and 1979-05-27 07:32:00 are not rewritten. The result is parsed again and compared value by value with your input before it is shown. The JSON panel shows what your configuration actually means, which is the quickest way to spot a value that ended up in the wrong table because a header was missing. Integers keep all their digits; dates and the special floats inf and nan appear as strings because JSON has no type for them. Common uses are checking Cargo.toml, pyproject.toml, netlify.toml and Hugo config files before committing. Everything runs in your browser.
How to Use
- Paste your TOML file.
- Fix any error shown with its line and column.
- Copy the formatted file or check the parsed JSON.
Frequently Asked Questions
Which TOML version is supported?
TOML 1.0.0, the version used by Cargo, pip and most current tools. Features that only exist in the TOML 1.1 drafts, such as inline tables over several lines, are reported as errors.
Does formatting reorder keys or sort tables?
No. Keys, tables and comments stay in their original order; only spacing, blank lines and array layout change.
Why is my date shown as a string in the JSON?
JSON has no date type, so offset and local dates and times are shown as the text you wrote. The formatted TOML keeps them as real TOML dates.
Is my file uploaded?
No. Validation and formatting run in your browser.
Related Tools
Convert between YAML and JSON formats.
Pretty print, minify, and validate JSON.
Check a Dockerfile for unpinned images, apt-get pitfalls, shell-form CMD, root users and baked-in secrets.
Validate .env files and compare them with .env.example to find missing, extra and changed variables.
Generate an nginx server block for static sites, SPAs, PHP-FPM, Laravel or a reverse proxy, with HTTPS.
Lint package.json and composer.json — names, versions, dependency ranges, autoload and common mistakes.