CSS Minifier

Minify CSS locally while preserving strings and important license comments. See the byte savings, copy the compact output, and catch unbalanced braces, quotes, or comments before use.

Browser-local No signup required Developer

Minify CSS text by validating basic brace, quote, and comment balance, then removing ordinary comments and unnecessary whitespace around common punctuation.

How to minify CSS

  1. Paste CSS into the input area.
  2. Press Minify to validate and compress it.
  3. Review the byte savings and copy the minified output.

What the minifier preserves and removes

Quoted strings and /*! important comments */ are temporarily protected so their contents survive minification. Ordinary /* comments */ are removed.

This is a lightweight text minifier. It collapses whitespace and punctuation spacing but does not perform semantic optimization, declaration merging, value rewriting, or a full CSS grammar parse.

Privacy and limitations

CSS is processed entirely in the browser. Basic unbalanced braces, quotes, or comments are rejected, but syntactically invalid CSS can still pass if those simple structural checks are balanced.

CSS minifier FAQ

Are all comments removed?

Ordinary comments are removed, while comments beginning with /*! are preserved.

Are strings safe from whitespace changes?

Quoted strings are protected during the minification pass.

Does it merge duplicate rules?

No. It only performs lightweight text minification.

Does it fully validate CSS syntax?

No. Validation only checks balanced braces, quotes, and comments.

Does it show size savings?

Yes. It compares Blob byte sizes before and after minification.