Make your CSS smaller
Every byte of CSS has to be downloaded and parsed before a page can render, so smaller stylesheets mean faster first paint, better Core Web Vitals and less mobile data. This CSS minifier strips whitespace and comments and applies structural optimizations — merging duplicate rules, shortening colors, removing redundant values — so your stylesheet gets as small as possible without changing how the page looks.
Features
- Whitespace and comment removal.
- Value shortening: colors, zeros, units and font weights.
- Structural optimization: merges duplicate selectors and removes overridden declarations.
- License comments (
/*! … */) kept on request. - Size comparison in bytes and percent.
- Private: runs entirely in your browser.
Before and after
.card .title {
font-weight: bold;
color: #333333;
}
.card .title {
font-size: 1.25em;
}
becomes
.card .title{font-weight:700;color:#333;font-size:1.25em}
When to minify
Minify CSS as part of your build for production, and keep the readable source in version control. Most frameworks and bundlers do this automatically; this tool is handy for quick fixes, CMS themes, email templates, embedded widgets and projects without a build step.
Related tools
Minify scripts with the JavaScript Minifier, create styles visually with the Box Shadow Generator and the CSS Gradient Generator, or format JSON with the JSON Formatter.