CSS Minifier
Shrink your CSS by stripping comments and unnecessary whitespace.
How It Works
- 1Paste your CSS.
- 2It's minified automatically.
- 3See the size reduction and copy the result.
Features
- Removes comments and whitespace
- Shows before/after size
Privacy
All processing happens instantly in your browser. Nothing you enter is ever sent anywhere.
About CSS Minifier
CSS files typically include comments, indentation, and blank lines for human readability, none of which affect how a browser applies the styles — a browser's CSS parser ignores that formatting entirely once the file is parsed into rules. Minifying CSS strips exactly that unnecessary content — comments, extra whitespace, and redundant line breaks — leaving only what's needed to express the same rules.
This matters for page performance, since CSS is typically render-blocking: the browser has to download and parse a page's CSS before it can safely paint content, so a smaller CSS file, especially over a slow connection, can measurably speed up perceived load time. It's standard practice to keep readable, commented CSS in source files and minify automatically at build or deploy time rather than by hand.
This tool performs conservative, whitespace-level minification — removing comments and unneeded spacing — rather than more aggressive optimizations like merging duplicate selectors, shortening color values, or removing unused rules, which require deeper analysis of the stylesheet and how it's used. For those transformations, a build-tool-integrated minifier is a better fit.