CSS Minifier
Shrink CSS by stripping comments, collapsing whitespace and removing redundant semicolons — all in your browser. See the before/after byte count and savings percentage, then copy or download the minified result.
How to use
- 1
Paste your CSS
Drop a stylesheet — your own, or copy-pasted from a CSS file — into the left-hand editor. Comments and indentation are welcome.
- 2
Toggle comment stripping
By default /* ... */ comments are removed. Turn the switch on to keep them (rarely useful in production but handy for debugging).
- 3
Minify and review
Click Minify CSS. Whitespace is collapsed, spaces around punctuation are removed, and the last semicolon before each } is dropped. The before/after sizes and savings % update instantly.
- 4
Copy or download
Copy the minified output to your clipboard, or download it as styles.min.css ready for production.
Common use cases
- Reduce a hand-written stylesheet's file size before deploying to a CDN.
- Combine several CSS files into one minified bundle for first-paint optimisation.
- Compare author-time CSS size against a PostCSS/CleanCSS pipeline to sanity-check savings.
- Strip comments from a vendor CSS file before inlining it into a critical-CSS block.
Limitations
- This is a structural minifier — it does not merge duplicate selectors, shorten hex colours, drop unused rules or remove overridden properties. Use CleanCSS or cssnano for that.
- Inputs larger than 1 MB are rejected to keep the tab responsive.
- CSS
calc()andvar()expressions are preserved as-is — spaces inside them are kept when needed to avoid changing semantics. - Source maps are not generated. Pair with a build tool if you need them.