Developer Tools

Minify CSS

Shrink CSS by stripping comments, whitespace, and redundant characters so your stylesheets download faster. Paste your CSS and the minified version appears instantly alongside a live character count and the percentage of size saved. Minification runs entirely in your browser.

.container{max-width:1200px;margin:0 auto;padding:0 20px}.header{background:var(--brand-color);color:white}

What minified CSS looks like

Minification is a purely textual transformation - the rules that reach the browser are identical, only the bytes carrying them are fewer.

Before — 118 bytes

/* Card surface */
.card {
    margin:   0px;
    padding:  16px 16px;
    color:    #ffffff;
}

After — 43 bytes

.card{margin:0;padding:16px;color:#fff}

Four separate savings are visible here: the comment is dropped, whitespace and the final semicolon go, 0px becomes 0 because a zero length needs no unit, the duplicated 16px 16px collapses to one value, and #ffffff shortens to its three-digit form.

Minify, gzip and Brotli are not the same thing

These three are often treated as alternatives. They are not - they stack, and using all three gives a smaller result than any one alone.

MinificationgzipBrotli
What it changesRewrites the source to be shorterCompresses the bytes in transitCompresses the bytes in transit
When it happensBuild time, onceEvery response, by the serverEvery response, by the server
What the browser receivesShorter sourceCompressed bytes, decompressed on arrivalCompressed bytes, decompressed on arrival
Helps parse timeYes - there is genuinely less to parseNo - the file is identical once decompressedNo - the file is identical once decompressed
Typical extra saving20–40% on unminified CSS70–80% on textRoughly 15–20% better than gzip

The order matters: minify first, then let the server compress. Minification is the only one of the three that reduces work for the browser’s parser, because gzip and Brotli hand over exactly the same css they were given once decompression finishes. Compression is usually already switched on at the CDN, which is why minifying is the step most likely to be missing.

What does minifying CSS do?

Minifying CSS removes whitespace, comments, and redundant syntax without changing how the stylesheet behaves, typically cutting 20–40% of an unminified file before gzip. Smaller CSS means less to download and parse, which directly improves render-blocking time and Largest Contentful Paint.

Is minification the same as gzip?

No. Minification rewrites the source to be shorter, and gzip or Brotli compresses whatever bytes are then sent. They stack: minify first, compress in transit, and the total saving is larger than either alone. Minified files also parse faster in the browser, which compression alone does not help.

Runs in your browser. Your files and text never leave your device - nothing is uploaded.