CSS Minifier
Minify and restructure CSS with CSSO in your browser. See the size before and after, then copy or download the .min.css file.
🔒 Runs entirely in your browser — nothing is uploadedWhat the CSS minifier does
This tool shrinks stylesheets with CSSO (CSS Optimizer), a minifier that understands CSS instead of treating it as plain text. In the first pass it performs safe cleanups: whitespace and comments are removed, colors are shortened (#ff0000 becomes red, #ffffff becomes #fff), zero values lose their units, redundant quotes and semicolons disappear and numbers are written in their shortest form. The result is exactly equivalent CSS that is noticeably smaller.
With restructure enabled, CSSO goes further and optimizes the structure of the stylesheet. Rules with the same selector are merged, selectors that share identical declarations are grouped, properties that are overridden later in the same rule are dropped, and longhand declarations such as separate margins can be collapsed into a shorthand. CSSO is careful to preserve the cascade: it only moves or merges rules when doing so cannot change which declaration wins.
Reading the results
The badges show the UTF-8 size of the input and output and the percentage saved. Hand-written CSS with comments and indentation often shrinks by 20–50%. Framework output that is already compact will gain less, while stylesheets that repeat the same declarations across many selectors benefit most from restructuring. Servers typically apply gzip or Brotli on top, so minification and compression complement each other rather than competing.
Private and safe to use
The minifier runs completely in your browser — nothing is uploaded, logged or stored. That makes it handy for inline critical CSS, email templates, embedded widgets or quick fixes on a machine without your usual build tools. Keep /*! ... */ comments if your stylesheet includes third-party licenses that must be retained. For production sites, add a minifier to your build so every deployment is optimized automatically, and always check the output visually when your CSS relies on browser hacks or unusual syntax.
How to use
- Add your CSSPaste a stylesheet or drop a .css file onto the drop zone.
- Choose optionsDecide whether to restructure rules and whether to keep /*! license */ comments.
- MinifyClick Minify CSS and check the size before, after and the percentage saved.
- Copy or downloadCopy the minified CSS or download it as a .min.css file.