Shipping a stylesheet that is mostly comments, indentation, and blank lines? This free css minifier strips everything the browser does not need and hands back a compact file that renders exactly the same. Everything runs in your browser, so nothing is uploaded, no account is needed, and no signup stands between you and the result.

How to use this css minifier

Three quick steps — no signup, no cost.

1Paste your stylesheet

A whole .css file or a pasted style block — comments and formatting do not matter.

2Minify it

Comments and whitespace go, safe shortenings are applied, and the before-and-after sizes appear so you can see what was saved.

3Copy or download the result

Drop the compact file into production, and keep your readable original for editing — never edit the minified copy.

What this css minifier trims — and what it refuses to break

Smaller files, identical rendering.

Comments removed, licences kept

Ordinary comments are stripped, but comments starting with /*! are preserved, so copyright notices survive into production.

Safe value shortenings

Colours like #ffffff become #fff and 0px becomes 0 — the same value in fewer characters, applied only where it cannot change meaning.

Strings and URLs untouched

Quoted text and url() values pass through exactly, so file paths and content strings never get mangled by whitespace rules.

Size feedback before you copy

Original size, minified size, and the amount saved are shown with the output, so the benefit is measured for your file, not promised in general.

Two things a careless minifier breaks — and how this one avoids them

If a minified stylesheet ever changed how a page looked, one of these is usually why.

calc() needs its spaces. In calc(100% – 20px), the spaces around the minus sign are required by CSS — calc(100%-20px) is invalid. A minifier that strips spaces around every operator will break your layout, so spaces inside calc() are always preserved.

Some spaces mean something. In .menu :hover the space is a descendant combinator — remove it and the selector means something else entirely. Spaces around braces, semicolons, and commas can go; the space between a selector and its descendant cannot.

Keep the readable source. Minified CSS is hard to debug in browser tools because it no longer maps to your original structure. Keep the commented original in version control, minify a copy for deployment, and use gzip or Brotli on the server as well — minifying and compression add up.

CSS Minifier FAQs

Short, direct answers to the questions readers ask most.

No, when done correctly: only comments, whitespace, and redundant characters are removed, while selectors, properties, and values stay the same, so the page renders identically.

Comments (except /*! licence comments), line breaks, indentation, redundant spaces, the last semicolon in each rule, and safe shortenings such as #ffffff to #fff and 0px to 0.

Yes, a beautifier restores indentation, but the original comments are gone for good, because they were removed during minification rather than stored elsewhere.

Only for production. Keep the human-readable source as the file you edit, and minify a copy for deployment.

Yes. It runs entirely in your browser with no account, no signup, and nothing uploaded.