Inspect
Formatter Validator Convert
TOML→JSON JSON→TOML TOML→YAML YAML→TOML INI→TOML TOML→INI .env→TOML TOML→.env TOML→TS Transform
Sort keys Flatten Minify Compare
Diff Merge
TOML Minifier
Re-emit a TOML document in its most compact form. Tables become inline where possible, blank lines disappear, arrays tighten. The parsed value tree is unchanged.
— S., [email protected]
comments are dropped on re-emit
In this page
When to minify
Minifying TOML is unusual — the format is human-first, so most files don't need to be small. The valid use cases are:
- Embedding TOML in HTTP headers, comments, or short fields. Inline tables and trimmed whitespace help fit a config under a length limit.
- Snapshot testing. A canonical compact form makes byte-level comparison reliable across editors.
- Diff-friendly storage. Some workflows prefer one-line-per-key inline tables for grepping.
How to use it
- Paste TOML on the left.
- Pick whether tables should inline when they're leaf-only (default), always inline, or stay as block headers.
- Copy or download the result.
FAQ
Is the output still valid TOML 1.0?
Yes. Inline tables and inline arrays are standard TOML syntax. Round-tripping through a parser produces the same value tree.
What about comments?
Stripped — re-emission goes through the parsed tree. If you want to preserve comments, keep the original file as the source of truth.
Difference from the formatter?
The formatter aims for human-readable canonical output. The minifier aims for the most compact valid output.