🎨

CSS Minifier

Compress CSS by removing comments, whitespace, and redundant characters. See exactly how many bytes you save.

Input CSS
Minified CSS

About CSS Minifier

CSS minification strips characters that browsers don't need β€” comments, whitespace, and redundant syntax β€” to produce a smaller file that transfers and parses faster. Even a 20–30% reduction in CSS size can improve Time to First Byte and First Contentful Paint.

What gets removed

  • Comments β€” All /* ... */ comment blocks.
  • Whitespace β€” Spaces, tabs, and newlines around selectors, properties, and values.
  • Trailing semicolons β€” The last property in a block doesn't need a semicolon.
  • Zero units β€” 0px, 0em, 0% β†’ 0.

How to Use

  1. Paste your CSS into the input area.
  2. Click Minify β€” the minified CSS appears in the output.
  3. The tool shows the original vs. minified byte size and compression percentage.
  4. Click Copy to copy the minified CSS for use in your project.

How It Works

The tool removes CSS comments, strips unnecessary whitespace and newlines, eliminates redundant semicolons, and collapses multiple spaces to single characters. The semantic meaning and all rules are preserved.

Example

A 15KB stylesheet typically minifies to 8–10KB β€” a 30–45% reduction. Over a page with multiple CSS files, this can save hundreds of milliseconds of load time.

FAQ

No β€” a correctly written CSS file will produce identical rendering after minification. The transformations are all semantically equivalent.
No. All processing runs in your browser. Nothing is ever sent to a server.