CSS Minifier

Minify CSS by stripping whitespace and comments, with size savings reported.

CSS Minifier Runs locally · No sign-up
Minified output

About CSS Minifier

Stylesheets are often the largest single asset a page loads, and most of the weight is whitespace, comments, and redundant final semicolons. This minifier compresses your CSS so the file transfers faster while rendering pixel-identically to the original.

Every rule and value is parsed before compression, which guarantees that removal of spaces, newlines, and the last semicolon of a block never changes the meaning of the stylesheet. An option keeps important comments like license headers, and the tool reports how many bytes you saved.

Web developers run it before deploying to production, where even a few kilobytes matter on mobile networks, and performance engineers use it to shave load time from critical CSS. Designers pasting compressed CSS into a CMS field also get a safe one-click reduction.

How to Use

  1. Paste your CSS.
  2. Press Minify CSS.
  3. Copy the compressed output and check the size saved.

Example

.box { margin: 0; padding: 0; } .box{margin:0;padding:0}

Spaces around braces, colons, and semicolons are removed, and the final semicolon is dropped.

FAQ

Does minifying CSS change rendering?

No, the compressed CSS produces identical results. It's a standard production step for any stylesheet.

Are comments removed?

Yes, comments are stripped. Use an option to keep important comments (like those with /*! */) if needed.

Can it combine redundant rules?

No, this tool only removes whitespace. Combining rules requires deeper analysis best left to build tools.

Does it compress hex colors or values?

No, this tool only removes whitespace and comments. Shrinking values like #ffffff to #fff is a deeper optimization that changes the file more aggressively, so it is left to build tools where you can review every transformation.

Can it process files with @import rules?

Yes. The @import rules and any other at-rules are preserved and compressed like everything else, though external files must be inlined by you first.