Skip to main content

CSS Minifier

Compress CSS by stripping comments and whitespace.

What does this tool do?

Direct answerCSS Minifier removes comments and all unnecessary whitespace to produce the smallest valid stylesheet.
Key factThe final semicolon before } is optional per the CSS grammar and is removed.
ProcessingRuns locally in your browser; no data is sent to a server.

How to use

  1. Paste CSS into the input.
  2. Click Minify CSS.
  3. Copy the compressed stylesheet.

Who is this for?

This tool was built for people who need a fast answer in the browser — no install, no account, no data leaving the device.

Developers formatting API responses or config files, analysts inspecting minified payloads, and students learning structured data formats. If you have ever squinted at a one-line blob hoping to find a missing brace, this page is for you.

Frequently asked questions

Are data URIs in url() safe?

Yes — string contents are never touched, only surrounding whitespace and comments.

Does it shorten color names or merge rules?

No — this minifier only removes whitespace and comments, keeping output predictable.

How much does CSS shrink?

Typical stylesheets compress 20–40%; commented files shrink more.

More tools in this category