CSS Minifier

Minify CSS code by removing whitespace and comments.

Minify CSS to make stylesheets load faster. Whitespace and comments are removed (except /*! licence comments), colours and numbers are shortened, and you can tick Merge and restructure rules to combine duplicate selectors for a smaller result, which is slightly riskier if rule order matters. The size before and after is shown. It uses the CSSO optimiser in your browser.

Common use cases

  • Shrink a stylesheet for a website or landing page
  • Minify CSS for an HTML email or embedded widget
  • Check how much smaller a stylesheet can get

How to use

  1. Paste your CSS.
  2. Tick restructure for extra savings if you've tested it.
  3. Copy or download the minified CSS.

FAQ

Is restructuring safe?

Usually, but merging rules can change which rule wins when selectors overlap in unusual ways. Check the page after using it.

Do I still need gzip?

Yes. Minifying and server compression work together; compression usually saves more.