Developer Tools

Free Online CSS Minifier

Paste your CSS to strip comments and unnecessary whitespace, producing a smaller, production-ready stylesheet.

How to use the cSS Minifier

  1. Paste your CSS into the input box.
  2. Click 'Minify CSS'.
  3. Compare the original and minified file sizes.
  4. Copy the minified CSS into your project.

Example

Minifying .btn { color: red; /* primary */ } produces .btn{color:red} — comments and whitespace removed.

Why minify CSS?

Smaller CSS files load faster, which matters for page speed and Core Web Vitals. Minifying removes comments, extra whitespace, and unnecessary characters without changing how the styles render.

Safe, whitespace-only compression

This tool strips comments and collapses whitespace without altering selectors, property names, or values, so your styling behavior stays exactly the same.

Frequently asked questions

No, only comments and non-essential whitespace are removed — all selectors, properties and values stay intact.

Yes, always keep your original, readable CSS as the source file and use the minified version only for production output.

Yes, CSS variables and modern syntax are preserved exactly, only whitespace and comments are stripped.

No, minification happens entirely in your browser.