CSS Minifier

Remove comments and squeeze every unnecessary space out of your stylesheets.

About this tool

This minifier removes CSS comments and collapses whitespace around selectors, properties and values, and drops the final semicolon in each rule. It is intentionally conservative: values are never rewritten, so your CSS behaves exactly the same after minification.

How to use it

  1. Paste your CSS, or click Sample.
  2. Click Minify CSS and copy the compact stylesheet.

Good to know

  • Whitespace inside url() and quoted strings is respected.
  • For a readable version of minified CSS, use the CSS Formatter.
  • Serving CSS gzipped or brotli-compressed shrinks it further — minification still helps and costs nothing.