ConvertAnyFiles

CSS Minifier

Shrink your stylesheets by removing comments, whitespace and unnecessary characters. Smaller CSS downloads faster, which improves page speed and Core Web Vitals.

Free · No sign-up · Files stay on your device

How to use CSS Minifier

  1. 1Paste your CSS or open a .css file.
  2. 2The minified CSS appears instantly, with the bytes saved.
  3. 3Copy it or download it as a .min.css file.

Features

  • Removes comments and whitespace safely
  • Leaves strings, URLs and calc() untouched
  • Keeps /*! license */ comments
  • Shows original vs. minified size
  • Download as .min.css

Why minify CSS?

CSS blocks page rendering: the browser waits for it before showing anything. Minifying typically cuts 20–40% from a stylesheet, which means a faster first paint, especially on mobile connections, and a better PageSpeed Insights score.

What the minifier removes

Comments, line breaks, indentation, spaces around braces, colons, semicolons and commas, and the last semicolon in each rule. Strings, URLs and calc() expressions are left intact so your styles behave exactly the same.

Frequently asked questions

Will minified CSS work the same?

Yes. Only characters that browsers ignore are removed. Keep your original file for editing, and serve the minified version on your site.

What are /*! comments?

Comments starting with /*! are a convention for license notices. They are kept so you stay compliant with open-source licenses.

Should I still enable gzip or Brotli?

Yes. Minification and server compression work together. Minify first, then let your server compress the file.

Related tools