CSS Minifier
Strip comments and unnecessary whitespace from CSS while safely preserving strings.
How to Minify CSS
- Paste your CSS into the input box.
- The minified version appears instantly below.
- Copy the result.
Frequently Asked Questions
What exactly does this minifier remove?
It strips /* comments */, collapses unnecessary whitespace and line breaks, and removes a trailing semicolon right before a closing brace — all safe, purely cosmetic changes that don't affect how the CSS behaves.
Will it break a string value like content: " spaced ";?
No — this tool specifically tracks quoted strings and leaves their contents completely untouched, including any spaces inside them, since whitespace inside a string is meaningful and shouldn't ever be altered.
Does this rename classes or restructure selectors like an advanced build-tool minifier?
No — this is a lightweight, safe minifier focused on comments and whitespace only. It doesn't merge duplicate rules, shorten color values, or rename anything, which keeps the output predictable and easy to reason about.
Is my CSS sent anywhere?
No — the minification happens entirely in your browser using JavaScript, so nothing you paste in is ever sent to a server.