TOML Minify

Parse the document, drop comments, blank lines, and spaces around =. Newlines between keys stay — TOML requires them. Expand restores formatted TOML. Copy URL-encoded for query strings.

Parsing and conversion on this page run in your browser.

Minify removes comments. It is lossy and does not replace careful editing.

All templates

Output

How to use

Example

[package]
name = "demo-lib"
version = "0.1.0"
edition = "2021"
description = "Sample library manifest"
license = "MIT"

[dependencies]
serde = "1"

[features]
default = ["std"]
std = []

FAQ

Will the result stay valid TOML?

Yes. Each key/value or table header stays on its own line. TOML does not allow multiple keys on one line.

How is this different from Compact on Format?

Compact drops blank lines. Minify also tightens spaces around =. Use Copy URL-encoded when you need a single-line URL parameter.

Related tools