CSS Minifier
Compress and minify CSS with csso. Paste your CSS or upload files — see the original size, minified size, and savings instantly. Batch mode and beautify included, 100% in your browser.
Why Minify CSS? Smaller Files, Faster Pages
CSS you write for humans is full of comments, indentation, and spacing that the browser throws away at parse time. A CSS minifier removes all of it before you ship, so visitors download fewer bytes and the browser reaches a painted page sooner. This tool uses csso, a structure-aware minifier that parses your CSS into a syntax tree — so beyond stripping whitespace it can merge duplicate rules and shorten values without ever changing how your styles render.
CSS is render-blocking: the browser will not paint until it has downloaded and parsed your stylesheets. Trimming their size directly improves First Contentful Paint and Largest Contentful Paint, two Core Web Vitals Google uses as ranking signals. Combined with gzip or Brotli on your server, minified CSS commonly transfers 70–85% smaller than the original.
Minify in Production, Keep the Readable Version
Always keep the formatted, commented CSS in source control — that is what you edit and review. Generate the minified version at build time (or with this tool) for deployment. If you have received a minified stylesheet and need to read it, switch to Beautify mode to re-expand it. To minify the rest of your front-end, use the HTML Minifier and JavaScript Minifier, or start from the Minify Tools hub.
Frequently Asked Questions
What does a CSS minifier do?
A CSS minifier removes everything a browser does not need to render your styles — comments, indentation, newlines, and redundant whitespace — and can safely shorten values (for example #ffffff to #fff). This tool uses csso, which parses the CSS into an abstract syntax tree and can also merge and restructure rules, producing smaller output than a naive whitespace strip. The result is functionally identical CSS at a fraction of the size.
Is it safe to minify CSS — will it break calc() or custom properties?
Yes. Because csso parses CSS into a real syntax tree rather than using regular expressions, it preserves the meaning of your styles. calc() expressions, CSS custom properties (variables), media queries, @supports blocks, and vendor prefixes are all kept intact. Only characters that have no effect on rendering are removed.
How much smaller will my CSS get?
Typical hand-written CSS shrinks by 15–30% from minification alone. Files with heavy commenting or deep indentation can shrink more. When your web server also applies gzip or Brotli compression on top of the minified file, the total transfer size is often 70–85% smaller than the original — which is why minification is a standard build step for production sites.
Can I minify multiple CSS files at once?
Yes. Switch to the batch tab, drop in or select multiple .css files, and the tool minifies each one and reports the per-file and total savings. You can then download the results. Everything is processed locally in your browser — no files are uploaded to any server.
Does minifying CSS improve page speed and SEO?
Smaller CSS means fewer bytes to download and less render-blocking work before the browser can paint the page, which improves First Contentful Paint and Largest Contentful Paint — both Core Web Vitals that influence Google rankings. Minifying CSS is one of the cheapest, lowest-risk performance wins available.