CSS Minifier
Strip whitespace and comments from CSS to reduce file size.
What gets stripped
Whitespace between selectors and declarations, comments, and the final semicolon before a closing brace are all safe to remove — none of them affect how the CSS is interpreted by a browser.
How much does it save?
The impact scales with stylesheet size — a small file sees little benefit, but a large stylesheet can shrink meaningfully, and the savings compound with gzip/Brotli compression.
Common Mistakes to Avoid
Hand-editing minified CSS
Solution:
Keep a formatted source version for editing and generate the minified version as a build step, never edit minified output directly.
Stripping comments a preprocessor relies on
Solution:
Some CSS build tools use specially formatted comments as directives. Review your comments before minifying if your build depends on them.
Frequently Asked Questions
No — only whitespace and comments are removed, neither of which affects rendering.
No — minification happens entirely in your browser.
What gets stripped
Whitespace between selectors and declarations, comments, and the final semicolon before a closing brace are all safe to remove — none of them affect how the CSS is interpreted by a browser.
How much does it save?
The impact scales with stylesheet size — a small file sees little benefit, but a large stylesheet can shrink meaningfully, and the savings compound with gzip/Brotli compression.
