CSS Minifier

Minify CSS by removing unnecessary whitespace and comments for a smaller output.

This tool runs entirely in your browser. Your files are never uploaded to a server.

body{color:#222;margin:0;}

What this minifier does

Compacts CSS-like text by removing line and block comments, collapsing whitespace, and trimming space around braces, colons, semicolons, commas, and selector combinators. Quoted strings and escaped characters are retained.

How to use it

Paste a stylesheet and review the result that updates immediately. Copy the output when ready or use Reset to clear the editor; the tool does not download a file or restore the sample.

Important limitations

This is a character-based transformer, not a CSS parser, validator, optimizer, or compressor. It removes every recognized /* block */ and // line comment, including license or preservation comments, and it does not report malformed syntax. Space-sensitive constructs such as complex calc() expressions, unusual escapes, data URLs, and preprocessor syntax require careful review.

Safe workflow and privacy

Keep the original, compare file sizes, and test the minified stylesheet in target browsers before deployment. Processing is local in your browser and pasted code is not uploaded.

Frequently Asked Questions

What does the CSS Minifier do?
Minify CSS by removing unnecessary whitespace and comments for a smaller output.
Does this CSS tool change program behavior?
It only changes layout or removable whitespace. Review minified output before production use when code relies on unusual syntax.
Is my code uploaded?
Processing is local and your code is never uploaded.