CSS Minifier Online
Compress CSS stylesheets to reduce file weight, decrease page load times, and improve Core Web Vitals. Strip comments, eliminate redundant spaces, remove trailing semicolons, and optimize zero-value units with instant byte savings calculations.
- Remove comments, redundant whitespace and unnecessary semicolons
- Optimize zero-value units and collapse rule declarations
- Calculate original size, minified size and percentage savings
Compress CSS stylesheets for faster page delivery
Paste your stylesheet into the input area, select whether to remove all comments or preserve license headers, and select Minify. The optimizer strips unnecessary whitespace around braces, colons, and semicolons, outputting dense CSS code.
Zero-unit optimization and syntax compression
Measurements like 0px, 0em, and 0% are collapsed to simple 0 values where permitted by CSS specifications. Trailing semicolons before closing curly brackets are omitted to save additional bytes across large stylesheets.
Preserving CSS variables and media queries
The minifier respects modern CSS features including CSS custom properties, media queries, flexbox, and grid declarations. Values within calc expressions and quoted strings are preserved without syntax corruption.
Measuring compression efficiency locally
Every minification calculates the original byte length, the minified byte length, and the percentage reduction achieved. Processing runs locally without uploading your code.
Technical references: CSS Reference · W3C CSS Specifications