Developer Tools

CSS Minifier

Strip comments and unnecessary whitespace from your CSS to shrink the file size before deploying it.

Size comparison will appear here after minifying.
Advertisement space

How CSS Minifier Works

The minifier removes comments and collapses whitespace around selectors and declarations, while leaving quoted strings untouched so values like content: " " keep their meaning.

How to Use This Tool

  1. Paste your CSS into the input box.
  2. Select Minify CSS.
  3. Copy the compact output and check the size reduction shown below it.

Example

Input:

.btn {
  color: #fff;
  background: #4f46e5;
}

Minified output: .btn{color:#fff;background:#4f46e5}

Helpful Tips

  • Keep an unminified copy of your stylesheet for editing — minified CSS is hard to read or debug later.
  • Comments are always removed when minifying, since they add size without affecting how the page looks.

Frequently Asked Questions

Does minifying break my CSS?
No, only whitespace and comments are removed — every selector, property and value is preserved exactly.
How much smaller does CSS get?
It depends on how much whitespace and how many comments the original had — typically 10–30% smaller.
Is my CSS uploaded anywhere?
No, minifying happens entirely in your browser.

This tool runs entirely in your browser. Your input is not uploaded to any server.