Minify CSS files in your browser

Removes comments and redundant characters without merging rules or rearranging the cascade. Your server should still gzip or brotli the result.

CSS
No CSS selected
Drop a file to start
Drop CSS files here

or browse your device. Everything is processed on this device

No CSS to hand?

Got it on your clipboard?

How to minify CSS

01
Drop the stylesheet

Choose one CSS file or a queue of them. Every byte is read in this tab and nothing is uploaded.

02
Choose whether comments stay

Ordinary comments come out by default. Turn the switch off when comments are part of the source you want to keep.

03
Read the result

The before and after source is shown directly, so shortened colours, whitespace and comments can be checked rather than taken on trust.

04
Copy or download

Copy the minified source back into an editor or download the CSS file. If it was already smaller, the original is returned.

What this CSS minifier changes

A stylesheet contains a surprising amount the browser does not need: indentation, spaces around punctuation, ordinary comments, the final semicolon in a declaration block, units on zero lengths and repeated digits in colours such as #aabbcc. Removing those characters changes neither the selectors nor the declarations they apply.

This tool stops there. It does not merge rules, combine longhand properties, reorder declarations or remove something that appears overridden. The cascade depends on order, specificity, layers, feature support and sometimes deliberate fallbacks, so those rewrites belong in a full build tool that understands the project.

Minification is also not transport compression. CSS responds extremely well to gzip and brotli because selectors and property names repeat. Serve the minified file compressed as well; if only one of those is available, server compression saves far more.

CSS minification FAQ

Will minifying CSS change how the page looks?

It should not. The tool removes whitespace where CSS grammar does not need it, keeps descendant selectors separated, and leaves strings, URLs and calc() expressions intact. It does not reorder declarations or merge rules, which are the transformations most likely to disturb the cascade.

Does it remove every CSS comment?

Ordinary block comments are removed when Strip comments is on. A licence banner written as /*! ... */ is always kept. Switch comment stripping off and all comments remain, while the rest of the stylesheet is still minified.

Does it merge duplicate selectors or properties?

No. That requires knowing whether source order, browser fallbacks, cascade layers or later JavaScript edits depend on the apparent duplication. This is a conservative syntax minifier, not a project-aware optimiser.

Should I use this instead of gzip or brotli?

No. Minify the source and serve it with gzip or brotli. Transport compression usually saves several times more than minification, and the two savings stack because the server compresses the already-minified file.

What happens to calc() and URLs?

They are copied conservatively. Spaces around plus and minus inside calc() can be required by CSS grammar, and a URL can contain characters that look like syntax, so neither is aggressively rewritten.

Drop more files

Same format joins the queue. Anything else re-routes to its own tool.