🎭

CSS Minifier

Minify CSS by stripping whitespace, comments and redundant characters. Typically 20–40% smaller, with no change to how it renders.

✓ Free forever✓ No signup✓ 100% private — runs in your browser
CSS Minifier & Beautifier
Minify CSS for production or beautify it for readability. Shows compression percentage.
CSS Input
Output
Minified/beautified CSS appears here…

CSS is render-blocking: the browser will not paint until it has downloaded and parsed your stylesheets. That makes stylesheet size one of the most direct levers on how quickly a page appears, and minification is the cheapest way to pull it.

How to use the CSS Minifier

  1. Paste your CSS
  2. Click Minify to compress it, or Beautify to format it back
  3. Check the size reduction
  4. Copy or download the minified output

What minification removes

  • Comments, which exist purely for developers.
  • Indentation, newlines, and spaces around braces, colons and semicolons.
  • The final semicolon in each rule block, which is optional.
  • Redundant units on zero values — 0px becomes 0.

None of this changes what the browser does. Whitespace between tokens in CSS is insignificant, so minified and formatted stylesheets produce identical rendering.

Minification is not the whole story

Minifying a stylesheet full of rules you no longer use still ships all of them. On mature projects, unused CSS is usually a far bigger win than whitespace — sites that pull in a full framework for a handful of components routinely ship 90% dead rules.

The order that actually pays: remove unused rules, then minify, then make sure the server sends the file with gzip or brotli. Compression typically does more than minification alone, and the two stack.

Keep your source formatted and minify as a build step. Minified CSS is unmaintainable by hand, and committing it destroys diffs.

Frequently asked questions

Does minifying change how my CSS renders?

No. Only insignificant whitespace, comments and redundant characters are removed. The rules, selectors, specificity and cascade order are all unchanged.

Can I reverse it?

Formatting restores readable indentation, but comments are gone permanently — they are discarded, not hidden. Always keep your formatted source.

How much smaller will my CSS get?

Typically 20–40%, depending on how heavily commented and indented the source is. Heavily documented stylesheets save most.

Should I minify if my server uses gzip?

Yes — they stack. Gzip handles repetition well, but minification removes content entirely rather than compressing it, so the combined result beats either alone.