CSS Minifier — compress CSS in one click
Paste your CSS below and get a smaller, production-ready file instantly. This free tool strips comments, whitespace and redundant characters — typically cutting 20–70% off your stylesheet, with zero uploads. Your code never leaves your browser.
style.min.css in production.How to minify CSS online
Three steps, under ten seconds — no software to install and nothing to upload to a server.
Paste or upload
Drop your CSS into the box above, drag in a .css file, or hit “Try sample” to see it work on example code.
Pick a level
Light keeps your code readable, Standard suits most sites, and Aggressive squeezes out every last byte for production.
Copy or download
Copy the result or download it as .min.css, then swap it into your site. Keep the original file as your editable backup.
Why minify your CSS?
Every kilobyte your visitors download delays the moment your page becomes usable. Minification is one of the easiest page-speed wins there is.
Faster page loads
A stylesheet that is 30–70% smaller downloads and parses sooner, improving First Contentful Paint — especially on mobile connections.
Better SEO signals
Page speed is a Google ranking factor through Core Web Vitals. Smaller CSS helps your LCP and render-blocking time, which supports higher rankings.
Lower bandwidth bills
Savings multiply with traffic: shave 40 KB off a stylesheet served a million times and you have saved roughly 40 GB of transfer.
Private by design
Many minifiers upload your code to a server. This one runs entirely in your browser with JavaScript — proprietary CSS never leaves your device.
What does this CSS compressor remove?
Minification only deletes characters a browser never needed. Your selectors, properties and values come out functionally identical.
| Optimization | Before | After | Levels |
|---|---|---|---|
| Comments removed | /* header */ | — deleted — | Standard + |
| Whitespace & line breaks collapsed | margin : 0px ; | margin:0 | All |
| Unneeded semicolons dropped | color: red; } | color:red} | Standard + |
| Zero units shortened | padding: 0px 0em | padding:0 0 | Aggressive |
| Leading zeros trimmed | opacity: 0.5 | opacity:.5 | Aggressive |
| Hex colours shortened | #ffffff / #ffaa00 | #fff / #fa0 | Aggressive |
| Empty rules removed | .unused { } | — deleted — | Aggressive |
License banners starting with /*! are always preserved, and text inside quotes and url() is never touched — so fonts, content strings and data URIs stay intact at every level.
Minified vs. readable CSS — which should you ship?
Develop with readable CSS, ship minified CSS. Keep your well-commented, nicely indented source file in your project — that is the version you and your team edit. The minified version is a build output: it exists only to be served to browsers as fast as possible.
Changed your mind about a minified file? Use the Beautify button above the output panel — it re-indents minified CSS back into a readable layout so you can inspect or edit it. And for the biggest speed win, pair minification with server compression (gzip or Brotli): minified CSS commonly compresses a further 70–80% on the wire.
CSS Minifier — frequently asked questions
Quick answers to the questions developers ask most about minifying CSS.
What is CSS minification?
Minification is the process of removing everything from a CSS file that browsers do not need to run it — comments, spaces, tabs, line breaks and redundant punctuation — without changing any styling behaviour. The result is a much smaller file that downloads faster.
Is this CSS minifier really free?
Yes — completely free, with no file-size cap, no daily limit, no watermark and no account. It runs on your own device, so there is no server cost to pass on to you.
Will minifying CSS break my website?
No. Minification never changes selectors, properties or values — only the formatting between them. Test once after swapping the file in, and always keep your original un-minified CSS as the source you edit later.
What is the difference between Light, Standard and Aggressive?
Light only collapses whitespace, so output stays fairly readable. Standard also removes comments and trailing semicolons — the right choice for most production sites. Aggressive additionally shortens hex colours, trims leading zeros, strips zero units and deletes empty rules for the smallest possible file.
Is my code uploaded anywhere?
No. All minification happens locally in your browser using JavaScript. Nothing is sent to a server, stored, or logged — you can even disconnect from the internet after the page loads and the tool keeps working.
How much smaller will my CSS get?
Typical hand-written CSS shrinks by 20–50% at Standard level and up to 70% at Aggressive, depending on how heavily it was commented and indented. Framework files with dense formatting shrink less; heavily documented project CSS shrinks most.
Should I minify CSS if I already use gzip or Brotli?
Yes — they stack. Minification removes bytes before compression, and compressed-minified CSS is still noticeably smaller than compressed-only CSS. Minify first, then let your server compress.
Keep learning — guides from the TechCoff blog
Go deeper on website performance, SEO and page speed with guides from the TechCoff blog. More free tools — SERP Preview and a Robots.txt Generator — are on the way.