🗜️ CSS Minifier

Minify CSS by removing comments, whitespace, and optimizing selectors. Instant size reduction — all in your browser, no upload.

About the CSS Minifier

This CSS minifier runs entirely in your browser. Paste your stylesheet, click Minify, and get a smaller version instantly. Nothing is uploaded to a server — all processing happens with JavaScript on your device.

What gets removed

  • Comments — All /* ... */ comment blocks are stripped.
  • Whitespace — Runs of whitespace are collapsed and spaces around { } : ; , > + ~ are removed.
  • Trailing semicolons — The last semicolon before a closing brace is removed.
  • Line breaks — Newlines are removed to produce a single compact line.

How to use the minifier

  1. Paste your CSS into the input box.
  2. Click Minify to produce the compressed output.
  3. Check the stats line for original size, minified size, and percentage saved.
  4. Click Copy to copy the minified CSS, or Clear to start over.

Frequently asked questions

Will minification break my styles? The transformations applied are safe for valid CSS. Selectors, values, and important comments are preserved correctly.

Does it handle media queries and nested rules? Yes. Standard at-rules and nested rule blocks are kept intact; only insignificant whitespace and comments are removed.

Is my CSS uploaded anywhere? No. Everything runs locally in your browser.