CSS Minifier
Minify and compress CSS stylesheets
About CSS Minifier
Shrinks CSS by stripping comments, line breaks and the whitespace around braces, punctuation and combinators, then shows how much smaller the stylesheet got. Values, colors and units stay exactly as written, so the savings come almost entirely from whitespace and comments and are smaller than a full CSS optimizer would achieve. Good for trimming a handwritten stylesheet before inlining it in HTML.
Category: Minifiers.
Frequently asked questions
What does CSS minification remove?
▾
Here it removes comments (including /*! license banners), line breaks, the spaces around { } : ; , > + and ~, and the semicolon before each closing brace. It doesn't shorten colors like #ffffff, turn 0px into 0 or merge shorthand properties; optimizers such as cssnano or Lightning CSS do that.
Does minification change the visual output?
▾
It shouldn't, but because the CSS isn't parsed, a few patterns break: calc(100% + 10px) loses the spaces around + that calc() requires, a descendant selector like .menu :hover turns into .menu:hover, and spaces around colons or commas inside quoted strings are removed. Check the result if your stylesheet uses any of these.
How much can CSS be reduced in size?
▾
It depends on how much indentation and how many comments the stylesheet has; after minifying, the tool shows the percentage saved and the size before and after. Serving the file with GZIP or Brotli compression reduces the transfer size much further.
Can I minify SCSS or Less with it?
▾
Not safely. Only /* */ comments are removed, so // line comments stay, and once the lines are joined they comment out everything that follows. Compile to plain CSS first and minify the result.