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
- Paste your CSS into the input area.
- Click Minify β the minified CSS appears in the output.
- The tool shows the original vs. minified byte size and compression percentage.
- 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.