TOML Formatter and Validator
TOML v1.0.0 validate and normalize via @iarna/toml. Scattered table fragments are regrouped into canonical order. Comments are not preserved.
Valid TOML — 4 top-level key(s), 4 table(s)
TOML Formatter and Validator — Free Online Tool
Validates and normalizes TOML v1.0.0 with @iarna/toml, rewriting the document in canonical form so tables, arrays of tables and inline tables are grouped and ordered consistently, and reporting syntax errors with their line, useful for tidying Cargo.toml, pyproject.toml, Netlify and Hugo configuration files.
How to use the TOML Formatter and Validator
- Open the tool above — it runs entirely in your browser, so your input never leaves this page.
- Paste or type your input into the field, then press the relevant button (e.g. Encode / Decode, Generate, or Convert).
- Copy the result from the output area with the copy button orCtrl/Cmd + C.
- No signup, no upload, and no tracking — repeat as often as you need.
Frequently asked questions
Why did the table order change?
Formatting round-trips the document, and the emitter writes each table once in canonical order. That is what merges the [dependencies.serde] and [dependencies.tokio] fragments scattered through a hand-edited Cargo.toml into one contiguous block.
My comments disappeared — is that a bug?
No. The parser produces a value, not a syntax tree with trivia attached, so comments cannot survive the round trip. Use the tool to validate and to see the canonical shape, then apply the changes to your commented original.
Which TOML version is enforced?
TOML v1.0.0, via @iarna/toml. Dotted keys, inline tables, arrays of tables, offset date-times and multi-line strings all parse; anything the spec rejects is reported as a syntax error.
Free & private — why use this TOML Formatter and Validator
The TOML Formatter and Validator runs 100% client-side in your browser. Your data is never uploaded to a server, no account is required, and the tool is completely free. It works offline once the page has loaded and is part of a growing collection of privacy-first developer utilities.