CSS Minifier
Shrink a stylesheet by removing everything a browser doesn't need: comments, indentation, the space around braces and colons, and the final semicolon in every block. The one thing it will not do is break `calc()` — the spaces around a `+` inside calc are load-bearing, and `calc(100%+2px)` is invalid CSS that a careless minifier will happily produce. Quoted strings and url() values are left exactly as written.
Nothing is uploaded — this tool runs inside your browser, so your files never leave your device.
Why use this tool
- Removes comments, whitespace and the redundant last semicolon in each block
- Keeps the spaces inside calc() that CSS requires
- Never touches the inside of a quoted string or a url()
- Reports the before and after size, and the percentage saved
How it works
- 1Paste your CSS.
- 2Read the saving reported underneath the result.
- 3Copy the minified stylesheet, or download it.
CSS Minifier — frequently asked questions
Typically 15-30% for hand-written CSS with comments and indentation, and close to nothing for a stylesheet a build tool has already processed. The saving reported under the result is the real figure for your file — most of it comes from indentation and comments rather than anything clever.
More developer tools
Looking for something else? Browse all developer tools
Explore the other tools
Same deal everywhere on the site — free, no sign-up, and no watermark on anything you download.
Or see every tool on one page.