Minify CSS
Minify CSS stylesheets right here: the tool runs csso in your browser, removes whitespace and comments, shortens values and merges rules with the same selector. You see the size before and after, including gzip, and can copy or download the result.
Your code is processed only in your browser and never uploaded.
From the Solo plan
A budget for the CSS weight of every page
Stylesheets grow unnoticed until they slow down rendering. A performance budget per URL in a plan limits stylesheet size and First Contentful Paint; PerfDelta emails you when a page breaks the budget.
Minify CSS with csso: shorter values and merged rules
csso goes beyond removing whitespace. It writes colors in their shortest form (#ff0000 becomes red), drops units after zero, removes empty rules and duplicate declarations, and with restructuring merges rules that share selectors or declarations. This page runs csso 5.0 in a web worker in your browser.
Minify CSS example: Tailwind preflight shrinks by two thirds
Measured with this tool's default settings on 27.11.2026: the commented base stylesheet preflight.css from Tailwind CSS 3.4 (MIT license) drops from 7,805 to 2,667 bytes, 66 percent less. With gzip at level 6 it goes from 2,668 to 1,123 bytes. Comments make up a large part of hand-written stylesheets, which is why they gain the most.
CSS minify restructuring: leave it on, turn it off for hacks
Restructuring moves declarations between rules and merges selectors; csso only does this where the cascade stays the same, within the rules csso can read. If a stylesheet relies on browser hacks or on the exact order of rules with equal specificity, turn restructuring off and compare. Without it, csso still removes whitespace and comments and shortens values.
Minify CSS first, then remove unused rules from the critical path
CSS in the head blocks rendering until it has loaded, so every kilobyte delays the first paint; the guide eliminate render-blocking resources covers the loading side. Minifying is the quick step; removing rules the page never uses usually saves more, see reduce unused CSS. Why Lighthouse flags unminified stylesheets is explained in the guide on minify CSS and JavaScript.
CSS minify errors: no result when csso would drop a rule
csso does not stop at a syntax error, it would drop the unreadable rule. The tool therefore shows no result in that case and lists the line and column instead. csso does not understand native CSS nesting yet; flatten nested rules with your build tool first, or minify them there. Sass, Less and other preprocessor syntax is not CSS: compile it first, then minify.
Other minifiers
Minify CSS FAQ: upload, layout and comments
Is my CSS uploaded?
No. csso runs in a web worker in your browser. The stylesheet is never sent to a server.
Can minified CSS change how the page looks?
csso is designed to keep the result of the cascade. If a stylesheet relies on hacks or rule order, turn off restructuring and compare the page. Stylesheets with CSS nesting are not minified, so no rule is lost.
Does the CSS minifier keep license comments?
Yes, with "Keep license comments" comments that start with /*! stay in the output. All other comments are removed.
Can I minify Sass or Less here?
No. Compile Sass or Less to CSS first and minify the compiled file.
More free tools
- Webfont Generator: Turns TTF, OTF and WOFF into WOFF2 web fonts with an optional Latin subset and ready @font-face code, or WOFF2 back into TTF. Fonts never leave your device.
- Website Speed Test: Tests several pages of a site on mobile and desktop and shows real-user data, lab findings and competitors in one report.
- Image Compressor: Compresses and converts JPG, PNG, WebP and AVIF in bulk, with responsive sizes and srcset code. Images never leave your device.
- Redirect Checker: Follows a URL hop by hop with status code and milliseconds, and checks that http, https, www and non-www end up at one address.
- HAR Analyzer: Reads a HAR file from DevTools in your browser: waterfall, slow requests, large files, third parties, compression and cache headers.
- Hosting Checker: Finds the host, CDN, server country and CMS of a site and places its real-user server response among other sites at the same host.
Third-party licenses
The minifiers use terser (BSD-2-Clause), html-minifier-terser (MIT) and csso (MIT), also for inline CSS. Full license texts: THIRD_PARTY_LICENSES.txt
A free account saves your tests and shows how your values change from one test to the next. Website performance monitoring with field data and alerts starts with the Solo plan.