Compress your CSS by removing comments, whitespace and the last semicolon in each rule β making stylesheets smaller and pages faster. Paste your CSS, choose your options and copy the minified result. 100% in your browser β nothing is uploaded or stored.
π Everything runs in your browser. Your input is never uploaded, logged or stored.
The CSS Minifier compresses your stylesheets by removing comments, collapsing whitespace, trimming unnecessary semicolons and optionally shortening zero values β all without changing how your styles render. Smaller CSS files download and parse faster, which improves page speed and Core Web Vitals, both of which support better user experience and search performance.
It is part of the Performance & Code Tools group in our free SEO Toolkit, alongside the HTML Minifier and JavaScript Minifier. To make minified CSS readable again, use the Code Beautifier, pull out above-the-fold rules with the Critical CSS Extractor, and estimate total weight with the Page Size Calculator. Everything runs in your browser β your input is never uploaded or stored.
Minify CSS safely with control over each step.
Removes CSS comments that are only useful to developers.
Removes spaces around braces, colons, semicolons and commas.
Optionally turns 0px into 0 and 0.5 into .5 to save bytes.
See the byte size before and after, with the percentage saved.
Paste, choose options, copy the smaller file.
Drop in a rule, a component or a whole stylesheet.
Choose what to remove and shorten.
Compare original and minified sizes.
Use the minified CSS on your site.
The same rule, minified.
.card { margin: 0px; padding: 0.5rem 1rem; }
.card{margin:0;padding:.5rem 1rem}
CSS minification removes characters from a stylesheet that the browser does not need in order to apply the styles β comments, indentation, line breaks and unnecessary spaces and semicolons. The result is a smaller file that produces exactly the same visual output but downloads and parses faster. It is one of the simplest, safest ways to improve front-end performance. This tool minifies your CSS for you. It is part of the Performance & Code Tools group.
| Item | Why It's Safe to Remove |
|---|---|
| Comments | Developer notes the browser ignores |
| Whitespace | Indentation and spaces around braces and colons |
| Trailing semicolons | The last semicolon before a closing brace is optional |
| Zero units | 0px and similar can safely become 0 (optional) |
CSS blocks rendering, so a smaller file paints the page sooner.
Lighter stylesheets help your Core Web Vitals scores.
Fewer bytes served reduces data and hosting costs.
Savings matter most on slower mobile connections.
No. The tool removes only characters that do not affect how the browser applies your styles, and it protects the contents of quoted strings and url() values, where spacing can matter. The rendered result is identical. As with any build step, test the output before deploying to production.
Turning 0px into 0 is safe because a zero length is the same regardless of unit. This option is off by default so you stay in control, since a few rare properties expect a unit. For ordinary layout and spacing values, shortening zeros is a reliable, common optimisation.
This tool is perfect for one-off files, snippets and learning. For a live site, minify automatically through your build process or a caching and optimisation plugin, so every change is minified without manual steps. Use this tool to understand the savings and handle ad hoc stylesheets.
No. Minification runs locally in your browser with JavaScript. Nothing you paste is uploaded, logged or stored, so the tool is safe for proprietary stylesheets, design systems and confidential client work.
Trim stylesheet weight to improve load times.
Minify component and utility CSS before shipping.
Compress hand-written CSS for production.
Compact CSS bundled with widgets and embeds.
Use the CSS Minifier with these tools from the SEO Toolkit: compress markup with the HTML Minifier, shrink scripts with the JavaScript Minifier, reformat minified code with the Code Beautifier, extract above-the-fold CSS with the Critical CSS Extractor, estimate weight with the Page Size Calculator, and build head tags with the Meta Tag Generator.
Anyone who wants lighter, faster stylesheets.
Everything about minifying CSS.
It compresses your CSS by removing comments, collapsing whitespace, trimming the optional last semicolon in each rule and, if you choose, shortening zero values. You paste your stylesheet, pick your options and copy the smaller, minified output for use on your site.
Yes, completely. There is no cost, no sign-up and no limit on how much CSS you minify. The tool runs entirely in your browser, so there are no server costs and nothing to pay for.
No. Minification removes only characters that do not affect how the browser applies the styles, and it protects quoted strings and url() values. The rendered page looks identical. Always test the output before deploying if your CSS uses unusual patterns.
Yes. Minification happens locally in your browser with JavaScript. Nothing you paste is uploaded, logged or stored, which makes the tool safe for proprietary stylesheets, design systems and confidential client work.
It depends on how much whitespace and how many comments your stylesheet contains. Heavily formatted, comment-rich CSS can shrink considerably, while already-compact files save less. The tool shows the exact before and after byte sizes and the percentage saved.
Content inside quotes, such as a value used with the content property, and the text inside url() can contain spaces or characters that matter. The minifier shields these from whitespace collapsing so it never alters something that affects how your styles work.
Yes, because a zero length is identical regardless of unit. This option is off by default so you remain in control, since a small number of properties expect a unit. For typical spacing and layout values, shortening zeros is a standard, safe optimisation.
The semicolon before a closing brace is optional in CSS, so removing it saves a byte per rule without changing behaviour. Across a large stylesheet with many rules, these small savings add up while keeping the CSS perfectly valid.
This tool is ideal for one-off files, snippets and learning. For a live site, automate minification in your build process or via an optimisation plugin so every change is minified consistently. Use this tool for ad hoc stylesheets and to see the savings.
Minification is not perfectly reversible, since comments and original formatting are gone, but you can reformat minified CSS into a clean, indented layout with the Code Beautifier. Keep your original source in version control as the source of truth.
Yes. The minifier is fully responsive, so you can compress CSS from a phone or tablet. Pasting your stylesheet, toggling options, viewing the savings and copying the output all work the same as on desktop.
Convert, compress, and resize images in multiple formats β JPG, PNG, WebP, ICO, and more.
Calculate in-hand salary, CTC breakup, tax deductions, and more for Indian employees.
Convert length, weight, temperature, speed, volume, and 200+ measurement units instantly.
Count words, convert case, generate lorem ipsum, find & replace text, and more writing utilities.
Strip comments and whitespace to make your stylesheets lighter and your pages faster in seconds β free, private and instant in your browser.
β‘ Open the Minifier β All Performance Tools