CSS Minifier
Compress and optimize your CSS code by removing unnecessary spaces, comments, and characters. Reduce file size and improve your website's performance instantly.
Minified output will appear here...
About the CSS Minifier
Paste a stylesheet and get a compact version with comments, line breaks and unnecessary spaces removed, ready to ship.
Everything you enter is processed in your browser; nothing is uploaded or stored.
How to use it
- Paste your CSS into Input CSS.
- The minified result appears in Minified CSS.
- Copy it into your production file or build.
What CSS minification removes
Browsers ignore comments, indentation and most whitespace in CSS, so removing them changes nothing about how the page looks. The minifier strips /* comments */, collapses runs of whitespace, and drops spaces around characters such as { } : ; and , where they are not needed.
The result is usually 15–30% smaller for hand-written CSS. With gzip or Brotli on the server the saving after compression is smaller, but it still helps first loads.
Example
body { color: #333; /* text */ margin: 0; } becomes body{color:#333;margin:0}.
Tips
- Keep the readable file as your source and minify a copy; minified CSS is hard to edit.
- Licence comments that start with /*! are often required to stay; add them back if your licence needs it.
Frequently asked questions
Does minifying CSS change how my site looks?
No. Only characters the browser ignores are removed; selectors, properties and values stay the same.
How much smaller will my CSS be?
Typically 15–30% for hand-written CSS with comments and indentation; already-compact CSS shrinks less.
Is my code uploaded?
No. The minifier runs in your browser.