CSS Minifier

Minify CSS — remove whitespace, comments, and optimise for production delivery.

About CSS Minifier

CSS minification removes whitespace, comments, and unnecessary characters while preserving the exact functionality of the original stylesheet. Modern CSS minifiers (cssnano, lightningcss) additionally perform optimisations like merging identical selectors, removing redundant properties, shortening color values (#ffffff → #fff), and removing vendor prefixes no longer needed. This basic minifier performs whitespace and comment removal.

FAQ

Does minification affect CSS specificity or cascading?
Proper minification preserves the exact semantics — specificity, cascade order, and all computed values remain identical. The only changes are to whitespace and comments, which have no effect on CSS behaviour. If minification breaks your styles, it is a bug in the minifier, not a fundamental issue with minification.