CSS Minifier
Shrink your CSS by removing comments and unneeded whitespace.
How to use
- Paste your CSS.
- It's minified instantly with a size comparison.
- Copy the minified CSS.
How the CSS Minifier works
Strips comments, whitespace and redundancy from CSS to reduce file size and shorten render-blocking download time.
Comments are removed, runs of whitespace collapse to single characters or nothing, the final semicolon in each rule is dropped, and zero units are shortened.
typical saving: 20–40% before gzip
Worked example
A rule written across four indented lines with a comment collapses to a single line of about half the characters.
Things worth knowing
- Minification and gzip compound. Minified CSS compresses better because there is less repetitive whitespace to encode.
- CSS is render-blocking: the browser will not paint until it is downloaded and parsed, so size directly affects First Contentful Paint.
- Keep the unminified source. Minified CSS is effectively unmaintainable by hand.
Frequently asked questions
Is the output safe to use?
Yes — it removes comments and whitespace without changing your rules.
Does it minify JS too?
This tool targets CSS; minifying JavaScript safely needs a dedicated tool.
Does minifying change how my CSS behaves?
It should not. Only insignificant whitespace and comments are removed; the rules are unchanged.
Is minifying still worth it with gzip?
Yes. The two work on different redundancies, and together they beat either alone.