CSS Minify
Minify your CSS file
Source code
Minified CSS
The result will appear here.
About this tool
This tool slims down a stylesheet before it goes to production, so your pages have less data to download. It suits a WordPress theme, a static page, an HTML email or any project without a build pipeline, when you want lighter CSS without installing PostCSS or configuring a bundler just for that.
Minification is handled by CSSO, which actually parses the CSS: it removes whitespace and comments, writes values such as colors and zeros in shorter form, and merges rules when doing so does not change the rendering. The tool then shows the size before and after along with the percentage saved, and the result downloads in one click.
How to use it
- Paste your stylesheet into “Source code” or choose a .css file under “Import a file”.
- Click “Minify CSS”.
- Check the output and the size savings under “Minified CSS”.
- Click “Download Minified CSS” to get the minified.css file.
Frequently asked questions
Is my stylesheet sent to a server?
No. CSSO is loaded into the page and minification runs in your browser. Imported files are read locally, and minified.css is generated on your device when you download it.
Why did the order of my rules change?
CSSO may group identical selectors or merge declarations to save space, but only when the rendering stays the same. The output can therefore be shorter than simple whitespace removal, with rules in a different order.
Does the tool accept SCSS, Less or nested CSS?
No, it expects flat, standard CSS. Sass or Less syntax and nested rules, including native CSS nesting, are not understood and may be dropped from the output without an error message. Compile your file to flat CSS first.
Are important comments kept?
CSSO removes regular comments but keeps those starting with /*!, the convention used for license notices. Add that exclamation mark to any comment that must remain in the minified file.