🧰Tools 🗜️ Compression🔄 Conversion✏️ Editing📄 PDF Tools⚡ Optimization🌐 Web Tools🧰 All Tools (69)
📱 Android App 📝 Blog 👋 About

Web Tools · Free · No signup

Minify CSS — Same Design, Fewer Bytes

Paste any stylesheet and squeeze the air out of it: comments disappear, whitespace collapses, the final semicolon before a closing brace is dropped and 0px becomes 0. Quoted strings and url() values are protected from all of it. The report shows original size, minified size and savings in real bytes — and the whole run happens locally in your browser.

🔒 100% private: everything runs inside your browser — nothing is uploaded, stored or logged.

How it works

  1. Paste your CSS — a full stylesheet, a component's styles or a design-token file.
  2. Choose whether comments should be removed (they are by default).
  3. Hit Minify — the compacted stylesheet appears with a byte-accurate savings report.
  4. Copy the result or download it as a .css file ready for production.

Features

Strings and url() protected

Quoted strings — content: "a b" — and url() values are lifted out before minification, so their exact spacing survives.

Safe value shortening

Zero lengths lose their unit (0px → 0) and the final semicolon before } is dropped — both are standards-safe.

Punctuation squeezed, @media safe

Spaces around braces, colons and semicolons vanish; the required space after @media is kept so media queries stay valid.

Byte-accurate report

Savings are measured in real UTF-8 bytes so you know exactly what the network will save.

100% private

Plain JavaScript in your browser — nothing is uploaded, stored or logged.

Input & output. Any CSS works — plain stylesheets, preprocessor output, print and media queries. Output is one compact line; paste it back through a formatter if you need to edit it again. For stylesheets with source maps or license headers, keep a comment banner in your build step instead — it will be removed here.

Common use cases

Limitations (honest ones)

This is a safe text-level minifier, not a full CSS parser: it does not merge duplicate selectors, reorder rules, autoprefix properties or convert colors. Chunks it doesn't understand are left alone. Because of that, savings are smaller than an AST-based tool would achieve — but the risk of changing what your design looks like is close to zero.

Frequently asked questions

Will my design change after minifying?

No — that is the point of the safe pipeline. Only comments, whitespace, the last semicolon and zero-length units are touched; selectors, declarations and values keep their meaning.

Why is the space after @media kept?

@media(max-width:…) is invalid CSS — the spec requires whitespace between the at-rule and its query. The minifier keeps that space so your media queries stay valid.

Does it merge duplicate rules or remove unused CSS?

No. That requires a full parser and can change the cascade. This tool stays text-level and safe; use a build-time tool like cssnano for advanced optimization.

Are strings and url() values safe?

Yes. Quoted strings and url() contents are extracted before minification and restored untouched — spacing inside them matters.

Is my CSS uploaded anywhere?

No. Everything runs locally in your browser; the tool works even with your network disconnected.

Keep going

Related tools

CompressoPanda Android app icon

On mobile?

Working from your phone?

This tool runs in any mobile browser — no app needed. And for the image & PDF side of the toolbox, the CompressoPanda Android app ships 36 tools that run with no connection at all: compression to target size, editing and PDF essentials included.