CSS Minifier
Minify CSS code by removing whitespace and comments.
Minify CSS to make stylesheets load faster. Whitespace and comments are removed (except /*! licence comments), colours and numbers are shortened, and you can tick Merge and restructure rules to combine duplicate selectors for a smaller result, which is slightly riskier if rule order matters. The size before and after is shown. It uses the CSSO optimiser in your browser.
Common use cases
- Shrink a stylesheet for a website or landing page
- Minify CSS for an HTML email or embedded widget
- Check how much smaller a stylesheet can get
How to use
- Paste your CSS.
- Tick restructure for extra savings if you've tested it.
- Copy or download the minified CSS.
FAQ
Is restructuring safe?
Usually, but merging rules can change which rule wins when selectors overlap in unusual ways. Check the page after using it.
Do I still need gzip?
Yes. Minifying and server compression work together; compression usually saves more.
Related tools
- JS MinifierMinify JavaScript code to reduce file size.
- HTML MinifierMinify HTML code by removing unnecessary whitespace.
- HTML FormatterBeautify HTML code with proper indentation and formatting.
- SQL FormatterFormat and beautify SQL queries with proper indentation.
- JSON FormatterFormat, validate, and beautify JSON data with syntax highlighting.
- XML FormatterFormat and indent XML documents for better readability.