Remove comments and whitespace from CSS and see exactly how many bytes you saved.
1.9 KB minified to 0 B
100% smaller (1.9 KB saved)
How It Works
Drop the stylesheet into the left pane or open a .css file from your computer. The minified version appears on the right as you type.
The strip above the panes shows original size, minified size and the percentage saved. Open Options to switch the extra passes: last semicolons, short hex colours, zero units, and whether /*! comments are kept.
Copy the minified CSS, download it as style.min.css, or publish it on a demo page to check that nothing changed. No account is needed for the 30-minute link.
About This Tool
A conservative CSS minifier that runs entirely in your browser and shows you exactly what it saved.
This CSS minifier takes a stylesheet and removes the parts a browser never needs: indentation, line breaks, the spaces around colons and braces, and ordinary comments. Then, if you leave the extras on, it drops the last semicolon in each rule, shortens #ffffff to #fff, and turns 0px into 0 and 0.5em into .5em. What comes out is the same stylesheet with fewer bytes, ready to copy, download or publish. The savings strip tells you the original size, the minified size and the percentage saved, so you can decide whether the smaller file is worth having.
Most people arriving here are holding a finished stylesheet from somewhere else: the CSS ChatGPT or Claude wrote for a landing page, an export from a design tool, a theme from a course, a file a freelancer handed over. Those files are usually well indented and full of explanatory comments, which is great for editing and pointless for serving. If you want to compress CSS before you put it online, or you simply want to see how much of your file is whitespace, paste it in.
The minifier is a small scanner written for these tools, not a heavyweight build step. It walks your CSS once and treats three things as untouchable: quoted strings, the contents of url(), and comments that start with /*!, the convention for licence notices. Everywhere else, whitespace is tightened and ordinary comments disappear. Spaces around the operators inside calc() are kept, because CSS requires them. The colour and zero-unit passes only run inside declaration values, never in selectors or @media conditions, and zero units are left alone inside calc(), clamp() and flex, where 0px and 0 are not interchangeable. Percentages, times and angles keep their units too. Everything runs in your browser; nothing is uploaded until you choose to publish.
This is a CSS compressor that prefers safe over small. It does not merge duplicate selectors, reorder or drop declarations, convert rgb() to hex, or rewrite shorthand properties. If you need the last few percent, a build-step minifier will do more. If you need the opposite, the CSS Formatter turns minified CSS back into something readable, and the HTML Minifier does the same job for the page around it, including any <style> block.
A stylesheet is not a page on its own, so the Publish button wraps the minified CSS in a small demo page with a heading, a paragraph, a button and a few cards, and puts it on a free OxyPages link with HTTPS in seconds, no account needed. The link lasts 30 minutes unless you claim it, and claiming is free; from there you can choose your own address and, on a paid plan, connect a custom domain. To ship a real page, paste the CSS into a <style> block or upload the .css file alongside your HTML in a ZIP. See how it works for the full picture.
Questions
More Free Tools
Every tool here runs in your browser and ends the same way: one click and your HTML is on a live link.
Tidy minified or messy CSS with consistent indentation, one rule per line and sorted braces. Runs in your browser. Copy or download the result.
Minify HTML to shrink your page: strip whitespace and comments, collapse attributes, see the bytes saved. Then publish the smaller file for free.
Write or paste HTML, CSS and JavaScript and run it in the browser. Live preview, console output, then host the result for free.
Try It Now
Still Here? Drop It In.
The whole pitch fits in one sentence: your HTML, on a link, in seconds.
Drag and drop your HTML file(s), folders, or ZIP file
or ·
No account needed. Your unclaimed website stays live for 30 minutes on a free subdomain. Claim it to your account to keep it permanently.