CSS minifier

Paste CSS to get a smaller version instantly, with the byte saving shown.

What this minifier does

Removes comments and whitespace, drops the last semicolon in each block, removes spaces around { } : ; , > and shortens 0px to 0. Strings and url() contents are protected. It does not merge rules or rewrite colors, which keeps it safe for any stylesheet.

Is minification worth it?

Minification typically trims 10–40% of a text file. With gzip or Brotli compression on the server the gain shrinks, because compression already removes repetition, but minified files still compress slightly smaller and parse a little faster.

Other minifiers

JavaScript minifier · HTML minifier

Frequently asked questions

Can minified code be reversed?
Formatting can be restored with a formatter, but removed comments are gone. Keep your original source files.
Will it break my code?
The rules are deliberately conservative. Still, test the result, especially with unusual syntax.