TOML Formatter & Validator
Format and validate TOML configuration files with canonical, easy-to-read output. Everything runs in your browser.
About this TOML formatter
This is a free online TOML formatter and validator. Paste a Cargo.toml, pyproject.toml, or any other TOML document into the input panel and you'll get a normalized, easy-to-read version back. Tables and arrays are grouped, key-value pairs are aligned, and any syntax error is reported with a clear message.
Features
- Validate against the TOML 1.0.0 specification.
- Sort keys alphabetically inside every table for a stable diff-friendly layout.
- Preserve values, dates, and string types exactly as parsed.
- Copy the result or download it as a
.tomlfile.
How it works
The tool uses the open source smol-toml parser, loaded as an ES module on first use. It parses the document into structured data, optionally sorts keys, and serializes it back to canonical TOML.
Privacy
Your configuration never leaves your browser. The whole tool runs locally on this page, so you can safely paste production secrets, deploy manifests, or any other sensitive TOML without it touching a server.
Frequently asked questions
Does this tool send my TOML anywhere?
smol-toml library is fetched once from a public CDN, but your document is never uploaded.