Minify TOML Online — Free TOML Compressor

Minify TOML configs such as Cargo.toml, pyproject.toml and DevOps files. Choose comment preservation or parse-based tight output.

Loading…
TOML Minification
Minify TOML online.

Features

Compress Cargo.toml and pyproject.toml with optional comment handling.

Minify TOML

Compress Cargo.toml and pyproject.toml with optional comment handling.

Basic example

Input TOML

# FastMinify library manifest [package] name = "fastminify" version = "2.1.0" edition = "2021" authors = ["FastMinify Team"] [dependencies] serde = { version = "1.0", features = ["derive"] } tokio = "1.35" [features] default = ["cli"] cli = []

Minified TOML

[package] name="fastminify" version="2.1.0" edition="2021" authors=[ "FastMinify Team" ] [dependencies] tokio="1.35" [dependencies.serde] version="1.0" features=[ "derive" ] [features] default=[ "cli" ] cli=[]

Options

Remove Comments
When true, parse+stringify drops # comment lines. When false, whitespace-only minify may preserve comments.

Parse path drops comments; whitespace path may keep them

Sort Keys
Sort object keys alphabetically when parsing and rewriting TOML.

TOML conversion helpers

Use JSON → TOML, TOML → JSON, YAML → TOML or TOML → YAML for format conversion.

FAQ about minifying TOML

Minification

Are # comments preserved?

Only when removeComments is false on whitespace paths. Parse-based minify removes them.

Beautify TOML?

See TOML beautifier. Comments cannot survive parse.

Cargo.toml support?

Standard TOML tables and arrays are supported. Paste one manifest at a time.

Verify it yourself

FastMinify processes your input in the browser. Inspect the network panel or read our validation gate to confirm nothing leaves your device.

Minify JavaScript, CSS, HTML, JSON, XML, SVG and other formats to cut the bytes you ship, before gzip or a CDN.