Minify CSS without ever reordering your selectors — with a live before/after rendered preview and a real gzip-compressed size estimate.
Selectors and declarations stay in exactly the order you wrote them, so cascade and specificity behavior is never affected.
See your CSS applied to a sample page before and after minifying, so you can confirm nothing visually broke.
Get an actual gzip-compressed size using your browser's native compression engine, not just a raw byte count.
Content inside strings and url() — file paths, font names, content values — is parsed and left completely untouched.
CSS variables are minified for whitespace and comments, but zero-unit stripping is safely skipped for their values.
Start with Safe or go Aggressive — no need to research every option before you get a usable result.
Some popular CSS minifiers reorder rules to squeeze out extra bytes — which can quietly change how your cascade behaves.
| Feature | SEOTriggers | Toptal | CleanCSS |
|---|---|---|---|
| Whitespace, comment & syntax minification | ✓ | ✓ | ✓ |
| Never reorders selectors or declarations | ✓ | Documented cascade-order bug | Can restructure rules |
| Live before/after rendered preview | ✓ | ✗ | ✗ |
| Real gzip-compressed size estimate | ✓ | ✗ | ✗ |
| Fetch directly from a live URL | ✓ | ✗ | ✗ |
| No ads, no account | ✓ | ✓ | ✓ |
Need to minify the HTML too? Try the HTML Minifier.
| Transformation | Why it's safe |
|---|---|
| Whitespace collapsing | Runs of whitespace are collapsed, but the single space used as a descendant combinator (like div p) is always preserved — only removed where it's purely cosmetic. |
| Comment removal | Ordinary comments are stripped; license comments starting with /*! can be preserved with a dedicated option. |
| Hex color shortening | #ffffff becomes #fff only when each channel pair is identical — otherwise the color is left as written. |
| Selector & rule order | Never changed. Reordering can flip which rule wins when two selectors share specificity — this tool avoids that risk entirely. |
It can if the minifier reorders your rules, since CSS cascade order and specificity depend on where a rule appears. This tool never reorders selectors or declarations — it only removes whitespace, comments, and redundant characters, so the cascade behaves exactly the same as your original file.
Yes. Custom properties (values starting with --) are minified for whitespace and comments like everything else, but zero-unit stripping is skipped for their values, since a custom property might be consumed elsewhere expecting a specific unit.
No. Content inside strings and url() is parsed and passed through untouched — whitespace collapsing and other transforms are never applied inside them, so file paths, font names, and content strings stay exactly as written.
Yes. Gzip compresses repetitive whitespace efficiently, but minification still reduces the amount of CSS the browser has to parse, and it typically saves additional bytes on top of compression from things like removed comments and shortened hex colors.
Minification removes unnecessary characters (whitespace, comments, redundant syntax) without changing the meaning or order of any rule. Optimization tools that merge or reorder selectors can shrink files further, but they carry real risk of altering cascade behavior if two rules with the same specificity get reordered.