CSS Minifier
Smaller Stylesheets, Same Design
This free CSS minifier works online, strips the comments and spacing out of your stylesheet and hands back a smaller file. First, paste your CSS or drop your files. Then press one button. Finally, copy the result, because the whole job happens in this tab.
- FreePrice
- Not neededAccount
- NoneUploads
- Every runChecked
CSS Minifier
Paste a stylesheet or drop your files — nothing is uploaded
Minified result
- Original
- —
- Minified
- —
- Saved
- —
- Gzipped
- —
- Rules
- —
- Took
- —
Ready. Paste your CSS, then press Minify or Beautify.
Inside the Denwix CSS Minifier: What It Strips and What It Keeps
A CSS minifier rewrites a stylesheet you wrote for people into one a browser downloads faster. It throws away your comments, your indentation and the gaps that only help a reader. However, it keeps every rule you wrote, so the page still looks exactly the same.
The saving matters because a stylesheet blocks rendering. A browser will not paint a single pixel until it has your CSS, so every byte you cut arrives ahead of the first paint rather than after it. Therefore a stylesheet that drops from 60 KB to 42 KB shows your design sooner.
People sometimes call the same job a CSS compressor. Both words describe one thing: fewer characters, identical behaviour. In short, you ship the small file and you keep the readable one.
Minifying safely means knowing what the parser needs. MDN's reference for CSS syntax is the shortest honest description of that.
Where Most Tools Quietly Break Your CSS
Three traps do nearly all the damage, and a tool built on find-and-replace walks into every one. First, `calc(100% - 20px)` needs the spaces around that minus sign. Remove them and the browser throws the whole declaration away, so your layout collapses with no error anywhere.
Second, `.card .title` and `.card.title` select different elements. That gap is the descendant combinator, and it carries meaning. Third, a data URI inside `url()` holds semicolons and commas that are not separators at all.

This tool reads your stylesheet one character at a time, so it knows which gap it is looking at. As a result it removes the spacing that means nothing and leaves the spacing that means something.
When to Minify CSS
Minify last, after your build and after your tests. Keep the readable stylesheet in your editor and publish the small one, because nobody should ever edit a minified file by hand.

It pays off most on the stylesheet every page loads. For example, a shared sheet that every visitor downloads deserves far more attention than one page-specific file.

What About Unused CSS?
Removing rules nothing uses is a different job, and a risky one. A class your JavaScript adds later looks unused to a scanner, so this tool never guesses. It shortens what you have instead.
Minify CSS in Four Steps
Zero installs, zero sign-ups, zero queues. All of the work happens inside this very browser tab.
- 1
Add your stylesheet
Paste your CSS into the editor, or drop your .css files onto the upload tab. Either route ends in the identical result.
- 2
Choose what goes
Comments go by default. Also, you can shorten colours and drop rules whose body holds nothing at all.
- 3
Press minify
The tool walks every character, rewrites the sheet, and then reads its own answer back before it shows you anything.
- 4
Copy or download
Copy the smaller stylesheet, or save it as style.min.css. Meanwhile your original stays exactly as you left it.
A CSS Minifier That Checks Its Own Work
Browsers fail silently on broken CSS. They drop the declaration and carry on, so nobody tells you anything went wrong.
It protects calc()
Inside calc, clamp, min and max, a spaced plus or minus keeps its spaces. Therefore your arithmetic survives, which is where most minifiers quietly fail.
It verifies every run
The tool reads its own output back and compares it to what it meant to write. If anything differs, it tells you instead of staying quiet.
It knows your selectors
A space between two selectors means "descendant", so it stays. Around a child or sibling combinator it means nothing, so it goes.
It passes url() through
A data URI can hold semicolons, commas and brackets. This tool treats the whole url() as one piece and copies it byte for byte.
Nothing leaves your tab
Your stylesheet never travels anywhere. There is no request, no storage and no log, so even client work is safe to paste here.
You see the saving as it truly is
You see the gzipped size beside the raw one, because gzip is what actually reaches your visitor.
Getting the Most From This CSS Compressor
A few small habits keep a minified stylesheet predictable.
- Keep the original. Always edit the readable sheet. So the minified copy stays something you generate, never something you maintain.
- Minify last. Run it after Sass, after PostCSS and after your tests. Otherwise you test one file and ship another.
- Serve it gzipped. Minifying and compressing stack up. As a result the wire size drops well below what the file looks like on disk.
- Mind your licence banners. Leave that switch on when a framework you use requires its attribution comment to travel with the code.
- Check the empty-rules switch. It stays off by default, because an empty rule sometimes documents an intention. Turn it on when you know it does not.
- Watch the verified badge. If a run ever says it could not verify, do not ship that file. Instead, send us the case and keep your original.
Mistakes That Break a Minified Stylesheet
Almost every "the minifier broke my design" story is one of these three.
Losing the calc spaces
A tool that strips them turns a valid length into nothing. Your layout then collapses without a single console error.
Editing the minified file
Your changes vanish the next time you build. So the fix always belongs in the source stylesheet.
Minifying twice
Running an already-minified sheet through again saves nothing, and it only makes the next diff harder to read.
CSS Minifier FAQ
Will this CSS minifier break my design?
It should not, and it checks rather than assumes. The tool reads every run back and compares it to what it meant to write, so it catches a lost brace or a mangled url() and tells you, rather than handing over a broken sheet.
Does it keep calc() working?
Yes, and on a busy site that saving adds up fast. Inside calc, clamp, min and max the spaces around a plus or minus stay exactly where you put them, because removing them turns a valid length into a declaration the browser throws away.
By what percentage will the Denwix minifier shrink my CSS?
A readable sheet usually drops 20 to 40 per cent, and the tool shows the exact figure for your file. However, a sheet that already ships compact saves far less, since there is less spacing to remove.
Does it remove CSS I do not use?
No. We built the Denwix version that way on purpose. A class your JavaScript adds later looks unused to any scanner, so guessing there would break real pages. This tool shortens what you wrote and leaves the decisions to you.
Does the Denwix CSS minifier send my stylesheet anywhere?
No. The whole minifier runs inside your browser tab. There is no request, no storage and no log, so you can safely paste work you cannot share.
Does the Denwix minifier take more than one file per run?
Yes. Open the upload tab and drop as many .css files as you like. The tool minifies each one separately, and you can download them one by one.
More Denwix Tools Worth Opening Next
Every Denwix tool listed here runs locally, with no login and nothing uploaded.
JavaScript Minifier
Shrink a script the same way, with the same check that the result still matches your code.
Open tool →SVG Compressor
Shrink SVG files or pasted markup, and strip any scripts hiding inside them.
Open tool →PNG to WebP Converter
Convert a batch of images to a lighter format, keeping transparency intact.
Open tool →
Shrink your next stylesheet in seconds
Paste your CSS, press one button, and check the saving for yourself. Nothing travels anywhere and nothing sticks around.