CSS Minifier
About the CSS Minifier
The CSS Minifier compresses your stylesheets into the smallest possible form by stripping all whitespace, removing comments, shortening colour codes from #ffffff to #fff, consolidating duplicate rules, and removing unnecessary semicolons. Smaller CSS files load faster, improve Core Web Vitals, save bandwidth on mobile networks, and boost SEO rankings through better PageSpeed scores.
What gets minified
All whitespace and indentation are stripped, single-line and block comments are removed, colour values are shortened (long hex to short hex, named colours to hex where shorter), zero units like 0px are reduced to 0, duplicate selectors are merged, empty rule blocks are removed, and vendor prefixes that are no longer needed can be optionally stripped. The result is functionally identical CSS typically 20–40% smaller.
How to use it
- Paste your CSS source into the input area.
- Click Minify.
- Copy the compressed output and use it in production.
When to minify
Always minify CSS for production websites. Many build tools (Webpack, Vite, Parcel) do this automatically, but if you are hand-crafting a stylesheet, deploying to a CMS that does not minify, or quickly testing a static landing page, this tool gives you instant compression without setting up a build pipeline.
Privacy and reverse operation
Minification runs entirely in your browser. Nothing is sent to our servers. To reverse minification and format compressed CSS back into a readable structure, use our companion CSS Beautifier tool.