CSS Minifier

Client-sideNo sign-upFree

Strip comments and collapse whitespace in CSS to shrink stylesheet size before shipping it.

How this tool works

1

Paste your CSS

Any stylesheet, including media queries and vendor prefixes.

2

Comments and whitespace are removed

Non-essential spacing around braces, colons, and commas is stripped along with comments.

3

Check the byte reduction

Before/after size and percentage saved are shown side by side.

4

Copy the minified stylesheet

Grab the compact output ready for production.

Quick facts

Category
Formatters & Beautifiers
Best for
Reducing stylesheet size for faster page loads
Input
153 bytes before
Minified output
.card{padding:16px;border-radius:8px;background:#ffffff}.card__title{font-size:18px;font-weight:600}
100 bytes after - 34.6% smaller
In-content slot

About this tool

Paste CSS and get it compacted by removing comments, collapsing the whitespace around braces, colons, and commas, and dropping the trailing semicolon before a closing brace - all without touching the actual property values or selectors, so the compressed output remains functionally identical to the source. Before/after byte counts and a percentage reduction show exactly how much smaller the stylesheet gets, which matters directly for page-load performance since CSS blocks rendering until it downloads. This is a whitespace-and-comment minifier, not a full CSS optimizer - it won’t merge duplicate rules, shorten color values, or reorder properties, so it’s safe to run on any valid stylesheet. Runs entirely client-side.

Why use this tool

Selectors and values untouched

Only whitespace and comments are removed - property values and the cascade stay exactly as written.

Visible size savings

Before/after byte counts show the real bandwidth impact, not just a vague "smaller" claim.

Handles modern CSS

Media queries, custom properties, and vendor-prefixed rules all pass through safely.

No build tooling needed

Minify a stylesheet without wiring up a CSS build step for a one-off file.

Frequently asked questions

No - only comments and non-significant whitespace (around braces, colons, commas, and semicolons) are removed. Selectors, property names, and values are left exactly as written, so the visual result is identical; the only difference is the file transfers faster.

Yes - the minifier operates on whitespace and comment patterns rather than parsing CSS into a syntax tree, so vendor-prefixed properties, @media blocks, custom properties (CSS variables), and nested @supports rules all pass through safely.

Explore more free tools

Formatters, converters, validators, and generators - all free and running entirely in your browser.

Browse more tools