Skip to content
Toolbox

CSS Minifier

Minify CSS by stripping comments and whitespace and shortening values. Shows original size, minified size and savings.

Minified code appears here.
Optimisations

About CSS Minifier

Remove comments, indentation and redundant characters from a stylesheet so it downloads faster. CSS is render-blocking, meaning the browser will not paint until it has parsed your stylesheet, so every byte removed here moves your First Contentful Paint earlier.

How to use it

  1. Paste your CSS.
  2. Select the optimisations you want.
  3. Minify and review the savings.
  4. Copy or download the result.

Frequently asked questions

Will minifying break my CSS?

No. Only insignificant whitespace and comments are removed. Selectors, declarations and cascade order are untouched, so the computed styles are identical.

Are my /*! */ licence comments kept?

Yes. Comments starting with an exclamation mark are the convention for licence headers and are preserved when the option is enabled.

Does this remove unused CSS?

No — that requires analysing your HTML and JavaScript. This tool only compresses what you give it.

In-depth reads that go beyond the calculator.