← All tools/Minifiers/Code/CSS Minifier
CSS Minifier
Smaller CSS, in your browser — paste CSS in, minified CSS out, with bytes saved.
Paste CSS here. It is minified as you type, in your browser.
Size saved
How it works
Minified = comments removed, whitespace collapsed,
spaces around {} : ; , > + ~ removed, ; before } removed
Strings are copied untouched, so content is safe
Worked example: the sample CSS is minified to .card{margin:0;padding:10px;color:red}.card .title{font-weight:bold} — the comment is gone, the spaces around braces and colons are gone, and the space between .card and .title stays, because it is part of the selector.
Frequently asked questions
Is my CSS sent anywhere?
No. Everything runs in your browser. Nothing is uploaded, stored or logged.
Will minifying break my CSS?
Not for ordinary CSS. Comments and whitespace are removed, and the final semicolon in each block is dropped, which is valid CSS. Strings in quotes are copied untouched, so content like font names and URLs with spaces survive.
Why is the last semicolon removed?
A semicolon before a closing brace does nothing, so dropping it saves one byte per block with no change in meaning.
Can I minify CSS with calc() or variables?
Yes. Spaces inside calc() are kept where they matter, because the minifier only removes spaces around punctuation, not spaces inside values.
More tools
Tell us what you think
Loving this tool, or stuck on something? Tell us — it takes a minute.
We’ll only use your name and email to reply if needed. The tool and page are filled in for you.