What it does
The CSS Minifier makes stylesheets smaller with CSSO. Beyond removing whitespace and comments, it shortens values (such as #ffffff to #fff and 0px to 0) and can merge rules that share declarations. The result shows the bytes saved.
How to use it
- Paste CSS into Input, or click Sample.
- Click Minify.
- Leave Merge rules on for the smallest output; turn it off to keep your rules in their original order and grouping.
- Copy or download the result.
Example
.btn {
color: #ffffff;
margin: 0px 0px 0px 0px;
}
.link {
color: #ffffff;
}
Minified with Merge rules:
.btn{margin:0}.btn,.link{color:#fff}
Good to know
- Merging rules is safe in almost every case, because CSSO only moves rules where the cascade result stays the same. Turn it off if you rely on a very specific order for debugging.
- Comments starting with
/*!are kept, so licence notices survive. - Serve the minified file compressed with gzip or Brotli for the smallest download.
FAQ
Can I undo minification? The CSS Formatter restores readable layout. Merged rules stay merged.
Does it remove unused CSS? No. It cannot know which selectors your pages use. That needs a tool that scans your HTML.