CSS Minifier
Strip comments and whitespace to shrink CSS.
🔒 Runs entirely in your browser — nothing is uploaded.
How CSS Minifier works
How does the CSS minifier work?
It runs a sequence of regular-expression passes over your stylesheet: stripping /* */ comments, trimming whitespace around { } : ; ,, collapsing a trailing ;} down to }, and squeezing repeated whitespace and line breaks into single spaces.
When should I minify CSS?
Minifying trims a stylesheet before deployment to reduce page weight and requests, which matters most for render-blocking CSS loaded in the <head> of a page.
Is this a full CSS parser?
No - it is regex-based rather than a real parser, so it does not specifically account for semicolons or braces that appear inside quoted strings, like a url("a;b") value. It works well on typical hand-written CSS but is not a substitute for a build-tool minifier on generated or edge-case-heavy stylesheets.