Removes comments, whitespace, and extra characters from CSS to shrink file size before you ship it. Fast, free, and built for simple browser-based workflows.
Paste your CSS above, then click Minify CSS.
728 x 90 In-Content Ad
CSS Minifier is a free online tool that strips comments, whitespace, and unnecessary characters from a stylesheet to make it smaller. Paste your CSS, click Minify CSS, and get back the same styles in far fewer bytes -- nothing to install and nothing uploaded to a server.
It's useful right before you deploy a stylesheet that grew large during development, when a build pipeline doesn't include a CSS step, or when you're pasting styles into a CMS that charges for every kilobyte of page weight. It also helps when auditing a page's load time -- pasting in an unminified file shows exactly how much of it was whitespace and comments versus actual rules. Beyond whitespace, it also drops the last semicolon in each block and trims leading zeros, so 0.5em becomes .5em. Minifying works alongside the gzip or Brotli compression most web servers already apply rather than replacing it: the server compresses whatever file it is given, so starting from a smaller file usually means a smaller download too.
Everything runs inside your browser, so your stylesheet is never uploaded to a server. That matters if the CSS belongs to a client project under NDA, an unreleased design, or anything else you'd rather not paste into a site you don't control. Treat the minified file as a build output rather than something to edit: keep your readable original as the working copy and minify a fresh copy each time you publish. If you ever need to read a minified file again, the CSS Beautifier tool restores the indentation, although comments that were stripped out cannot be brought back.
Drop your stylesheet into the CSS to Minify box.
Tick Keep /*! important */ comments to preserve licence headers, and Shorten hex colours to compress values like #ffffff down to #fff.
The result appears below, along with the exact character count before and after and the percentage saved.
Use Copy for the clipboard or Download to save it as minified.css. Clear resets both boxes.
Yes! All our tools are 100% free to use with no hidden costs, no registration required, and no credit card needed.
Absolutely. All tools run entirely in your browser (client-side). Your data never leaves your device and is not sent to our servers.
Yes, once the page is loaded, the tool will continue to work even if you lose internet connection since it runs in your browser.
There is no strict character limit, but very large amounts of text (100,000+ characters) may slow down your browser.
Yes! All our tools are free for both personal and commercial use.
No. It only removes comments, whitespace, and redundant characters -- selectors, properties, and values are untouched, and quoted strings and url() values are protected so nothing inside them gets mangled.
Some CSS comments start with /*! to mark them as a licence or attribution notice that tools should not strip. Ticking "Keep /*! important */ comments" preserves any comment written that way while removing all others.
No. #ffffff and #fff render identically in every browser -- shortening only applies when both characters in each colour pair match, so nothing is approximated or rounded.
It depends on the original file. A stylesheet formatted with indentation and comments for readability commonly shrinks 20-40%; a file that is already dense will save much less.
Yes. The minifier works on the raw text of the stylesheet, so at-rules, custom properties, nested selectors, and any other valid CSS syntax pass through and get compressed the same way as regular rules.
No, it only compresses what you paste in. If your CSS has a syntax error, the minifier will not catch it -- check the output visually or run it through a validator first if you need to confirm it is error-free.