Free developer tool
CSS Minifier
Minify CSS with CSSO: strip whitespace and comments, shorten colors and values, and merge duplicate rules.
Options
or press Ctrl/⌘ + Enter
Lighter stylesheets
CSS blocks rendering: the browser won't paint the page until it has downloaded and parsed your stylesheets. Minifying them is one of the simplest ways to get the first paint sooner.
This tool uses CSSO, a structural CSS optimizer. Beyond removing whitespace and comments, it shortens colors (#ff0000 becomes red), collapses values like 0px 0px to 0, and with Merge rules on, combines selectors that share the same declarations.
Good to know
- Merging rules respects the cascade, but if you rely on a very specific rule order, compare the output before using it.
- Comments that start with
/*!are kept by default, as most licenses expect. - CSSO quietly skips CSS it can't parse, so the tool warns you about unbalanced braces, the most common cause.
Frequently asked questions
- How much smaller will my CSS get?
- It depends on how it was written. Hand-written CSS with comments and indentation typically shrinks by 20–40% before gzip. Already-minified CSS will barely change.
- Does it remove unused CSS?
- No. Minification keeps every rule. Removing unused selectors needs your HTML as well, which tools like PurgeCSS handle at build time.
- Is my CSS sent anywhere?
- No. CSSO runs in your browser, so the stylesheet stays on your device.