CSS Minifier
Compress a stylesheet in one click: comments go, whitespace collapses and redundant semicolons disappear. Quoted strings are protected, so values stay correct.
How to use the CSS Minifier
Paste your stylesheet into the input box, or click Sample for a demo with comments, a media query and an rgba() value.
Click Minify to strip comments, collapse whitespace, tighten the punctuation around { } : ; , > and remove the last semicolon in each block.
Check the percentage saved, then Copy the result or Download it as a .css file.
Frequently asked questions
Which transformations does the CSS minifier apply?
It removes comment blocks, collapses runs of whitespace to a single space, strips spaces around { } : ; , and >, and drops the last semicolon of each declaration block. Nothing else is changed.
Will minifying break my quoted values?
No. Quoted strings and content values are temporarily protected before whitespace is collapsed, so text such as content: "a ; b" keeps its inner spaces and punctuation.
Is my CSS uploaded anywhere?
No. All minification runs locally in your browser with plain JavaScript; your stylesheet never leaves the page.