CSS Minifier
Strip whitespace and comments from CSS.
Minify CSS by removing comments and unnecessary whitespace.
How it works
Comments, line breaks and unnecessary spaces are removed from your stylesheet while the rules themselves stay the same.
When it helps
Smaller CSS files download faster, which improves page speed, especially on mobile.
What gets removed
The minifier removes comments, line breaks, indentation and spaces that the browser doesn't need — for example around braces, colons and semicolons. Selectors, properties and values are left as they are, so the stylesheet behaves the same.
For example, a rule written over four lines with a comment above it becomes a single line like .btn{color:#fff;padding:8px 16px}.
When to minify
Minify the version you publish, not the one you edit. Keep your readable source file for development and run it through the minifier before uploading. Most build tools do this automatically, but a quick online minifier is useful for small sites, email templates and one-off snippets.
Combine minification with gzip or Brotli compression on your server for the biggest savings. Together they can shrink a stylesheet to a fraction of its original size.
Frequently asked questions
Will minifying break my styles?
It shouldn't. Only whitespace and comments are removed. Keep your original file for editing.
How much smaller will it get?
Typically 15–30%, depending on how many comments and how much formatting your file has.
Can I un-minify CSS?
You can re-indent it with a formatter, but removed comments are gone for good — which is why you should keep the original.
Tools In Orbit · About · Contact · Privacy · Terms