How to use the CSS Minifier
- Paste your CSS
- Click Minify (it also updates as you type)
- Copy or download the .min.css file
About this tool
The CSS minifier removes comments (except /*! … */ license comments), collapses whitespace, removes spaces around { } : ; , and before closing braces, shortens six-digit hex colors that repeat pairs (#ffffff → #fff), drops leading zeros (0.5em → .5em) and drops units on zero values (0px → 0). Quoted strings, such as content: "a b", are never changed. Media query syntax like and ( keeps its required space.
Frequently asked questions
Will it merge duplicate rules?
No. It only applies safe, local changes, so the cascade order and behavior stay exactly the same.
Is 0px always the same as 0?
For lengths, yes. The tool does not touch values like 0s in transitions, where the unit is required.
Should I keep the original file?
Yes. Edit the readable version and minify it as a build step. Minified CSS is hard to maintain.
Related tools
Updated · Built and maintained by the UtilityBright team · About our tools · Report a problem