TOML Formatter / Validator
Validate and consistently reformat TOML config files — using @iarna/toml, entirely client-side.
About this tool
The TOML Formatter & Validator parses TOML documents and re-serializes them into a consistently formatted representation, surfacing syntax errors with the exact line and column where parsing failed. TOML (Tom's Obvious, Minimal Language) is the configuration format behind Cargo.toml (Rust), pyproject.toml (Python), and countless CLI tool configs precisely because it aims to be unambiguous — but its strict typing and table syntax still trip up hand-edited files.
This tool uses @iarna/toml, a widely used spec-compliant TOML parser and serializer, running entirely in your browser. Paste a TOML document and it is parsed into a structured value, then re-emitted in a normalized style: consistent table headers, quoting, and array formatting. If the input is invalid — an unclosed string, a duplicate key, a malformed array of tables — the error message reports the reason along with the line and column, so you don't have to scan the whole file to find the problem.
Because parsing and formatting happen entirely client-side, this tool is safe for TOML files containing internal package metadata, private registry URLs, or other non-public configuration — nothing leaves your browser tab. Common uses: validating a Cargo.toml before a build, formatting a pyproject.toml consistently across a team, or debugging a "duplicate key" or "invalid TOML" error thrown by a build tool.
