CSS Minifier
Minify CSS safely: comments are removed, whitespace collapses, trailing semicolons drop, and well-known safe optimisations apply (0px becomes 0, 0.5 becomes .5).
- 100% Free
- No Registration
- Works in Your Browser
This tool's workspace loads here.
How to Use
- Paste your CSS into the input box.
- Click Minify CSS.
- Check the character saving shown.
- Copy the minified CSS into production.
About This Tool
Minify CSS safely: comments are removed, whitespace collapses, trailing semicolons drop, and well-known safe optimisations apply (0px becomes 0, 0.5 becomes .5). Strings are protected by a real tokenizer, so a content value containing punctuation survives untouched.
Frequently Asked Questions
Is this minifier safe for any CSS?
It uses string-aware tokenising and only applies whitespace and zero-unit optimisations that cannot change rendering. Exotic hacks from the old-browser era are the only known exception.
Is my code uploaded?
No. Minifying happens in your browser.
Should I minify CSS by hand on my site?
For a page or two, yes. For a whole site, use this to check savings, then let your build tool or cache plugin do it automatically.