CSS minifier

What this CSS minifier does

It compacts your stylesheet by removing most comments, extra spaces, and line breaks that human editors add for readability. The cascade and selectors stay functionally the same, but the file gets easier to inline or drop into a size-capped field. It does not tree-shake unused rules, rewrite custom properties for older browsers, or inline critical CSS—those are build-pipeline jobs.

When to use it

Use it for quick experiments, when a theme export swells with banner comments, or when you need a one-off minified block for a single-HTML proof. In production, prefer your bundler (PostCSS, esbuild) with source maps; pair this page with HTML minifier and JS minifier when you are comparing all three wire sizes for a static handoff.

Worked example

A marketing landing page ships a 120KB CSS file, mostly comment headers from a design system copy. You minify a branch here, show a 30% byte drop, and open a ticket to turn on minification in the real pipeline—evidence first, config second.

Frequently asked questions

Will @import or url() break?

Valid minifiers keep tokens inside strings. If something breaks, you likely had an unclosed comment or bad escape before minification.

Do I still need gzip or Brotli?

Yes. Minification and compression stack; never ship huge human-formatted CSS just because transport encodes it.

What about license comments?

Some legal notices require retention. Tools may strip them—reinsert required blocks in your build, not from ad hoc minify output alone.

Related tools

Similar tools

HTML minifier

Minify your HTML by removing all the unnecessary characters.

99
JS minifier

Minify your JS by removing all the unnecessary characters.

55

Popular tools