Skip to content
AllInOneTools

CSS minifier

Minify CSS safely by removing comments and unnecessary whitespace, and see how many bytes you save.

Runs in your browser – your files are not uploaded

How to use CSS minifier

  1. 1

    Paste your CSS into the input field.

  2. 2

    Decide whether to keep /*! licence comments.

  3. 3

    Copy the minified CSS or download it as a file.

About CSS minifier

Smaller stylesheets load faster. The CSS minifier removes comments, line breaks and unnecessary spaces, and drops the last semicolon before a closing brace. It shows the size before and after and how much you saved.

The minifier is deliberately conservative: strings, url() values and calc() expressions stay intact, and values, selectors and rule order are never rewritten. That means the output behaves exactly like your original stylesheet. Licence comments starting with /*! can be kept. For the biggest savings in production, combine it with gzip or Brotli compression on your server.

Frequently asked questions

Can minification break my CSS?

This minifier only removes comments and whitespace where it is not significant. It keeps spaces inside calc(), in selectors such as “a :hover” and inside strings, so the result is equivalent to the original.

Does it merge rules or shorten colors?

No. Advanced optimizations like merging rules or rewriting values can change behavior in edge cases, so they are intentionally left out.

Is my code uploaded?

No, the minification runs entirely in your browser.