Secure & Instant CSS Minifier for Developers

Minify CSS in your browser — strip comments and whitespace and tighten syntax to shrink the stylesheet, with the size saved.

100% Browser-Based Local Processing
Raw CSS Size: 0 B
Minified Output
Size: 0 B 0%

Privacy Focused

🔒 Local Processing. Your code never leaves your device.

Instant Results

🌐 Fully Client-Side. Runs instantly in your browser.

No Signup

⚡ No accounts. No API keys. Just open and use.

Browser Based

🚀 No installs, no CLI, no build step.

Shrink your CSS — safely and privately

A CSS Minifier shrinks a stylesheet by removing comments and insignificant whitespace and tightening syntax (like dropping the last semicolon in a block). The result is smaller but renders identically — the cascade and every rule are unchanged. This one runs entirely in your browser, so your CSS is never uploaded.

Smaller stylesheets load faster. A CSS minifier reduces file size by removing comments and collapsing whitespace, and by tightening syntax — trimming spaces around braces, colons, and semicolons, and dropping the redundant final semicolon in each rule. The result is the smallest equivalent CSS: it looks unreadable, but the browser renders it exactly the same.

Paste your CSS or load a local file, choose your options (remove comments, collapse whitespace, and optionally preserve important comments like /*! license */ banners), and the tool minifies it and shows the size before and after with the percentage saved. It preserves url() and string contents exactly, and never reorders or renames anything. Copy, download, or flip back to beautify whenever you like.

Privacy is the throughline. Minifying happens in your browserno server, no upload, no logging, no tracking. You can minify proprietary stylesheets without any of it leaving your device, and the tool works offline once loaded.

Some honest notes. Unlike HTML, CSS minification is safe — CSS ignores insignificant whitespace, so removing it never changes which rules apply, the cascade, or specificity; your styles behave identically. But it's a minifier, not an optimiser: it won't merge duplicate rules, remove unused CSS, or add vendor prefixes — for those, use a build tool like cssnano/PostCSS. It targets plain CSS, so compile SCSS/LESS first. And for transport, server compression (gzip/brotli) usually saves more than minifying alone, though the two stack.

For the reverse, see the CSS Formatter; for markup and scripts, the HTML Minifier and JavaScript Minifier.

When a CSS minifier helps

  • Faster pages. Trim stylesheet size for quicker loads.
  • Production builds. Ship minified CSS by hand when no build step exists.
  • Inline styles. Compact CSS embedded in HTML or a CMS.
  • Bandwidth. Reduce transfer where compression isn't applied.
  • Sensitive stylesheets. Minify proprietary CSS without uploading it.

How to minify CSS

Paste or load your CSS

Type it, paste it, or open a local file (read in-browser, not uploaded).

Choose options

Remove comments, collapse whitespace, optionally keep /*! important */ comments.

Minify

The tool strips whitespace/comments and tightens syntax.

Check the size saved

See bytes before/after and the percentage.

Copy or download

Grab the minified CSS — it renders identically. Nothing is sent anywhere.

Realistic example

A commented, indented 60 KB stylesheet might minify to around 45 KB — roughly a quarter smaller — before any server compression. The tool shows the exact saving for your file.

Advanced tip

Keep a license banner in the output by wrapping it as /*! ... */ and enabling "preserve important comments".

Common mistake to avoid

Don't expect the minifier to remove unused rules or duplicate selectors — that's an optimiser's job (like cssnano). Minifying only strips whitespace and comments.

Related

To read minified CSS again, use the CSS Formatter.

What to keep in mind

  • Zero-knowledge and private. Minifying runs in your browser — nothing uploaded, logged, or tracked, and it works offline.
  • Equivalent and safe. It only removes whitespace/comments and tightens syntax; the cascade, specificity, and every rule are unchanged.
  • Preserves important comments. Optionally keep /*! ... */ license banners; url() and strings are always preserved.
  • Not an optimiser. It won't merge rules, remove unused CSS, or add vendor prefixes.
  • Preprocessor + gzip. Compile SCSS/LESS first; and gzip on your server usually saves more, though they stack.

Frequently Asked Questions

How do I minify CSS?

Paste your CSS (or load a local file), choose your options — remove comments, collapse whitespace — and the tool strips the non-essential characters and tightens the syntax to produce the smallest equivalent stylesheet. It shows the size before and after so you can see the saving. Then copy or download the minified CSS. Everything happens in your browser; nothing is uploaded.

Does minifying change my styles?

No. CSS ignores insignificant whitespace, so removing it and comments never changes which rules apply, the order of the cascade, or specificity — your page looks exactly the same. The minifier preserves url() values and string contents, and never reorders, merges, or renames anything. It's a safe, equivalent transformation; only the file size changes.

Does this upload my CSS, and does it work offline?

No upload, and yes it works offline. All processing happens in your browser using JavaScript — there's no server receiving your stylesheet, no logging, and no tracking. That makes it safe for proprietary CSS. Once the page has loaded it keeps working with no internet connection, which you can confirm in your browser's network tab.

What does minifying CSS remove?

Comments and insignificant whitespace, plus some redundant syntax. It strips /* ... / comments (optionally keeping /! ... */ important ones), collapses spaces and line breaks, removes spaces around braces, colons, semicolons, and commas, and drops the last semicolon before a closing brace. It doesn't remove rules, properties, or values — the stylesheet's behavior is unchanged.

Does it keep license or important comments?

It can. Comments written as /*! ... / (with the exclamation mark) are conventionally treated as "important" — often license or attribution banners — and the tool can preserve them while removing ordinary / ... */ comments. Enable the "preserve important comments" option if you need a banner to survive minification. All other comments are stripped to save space.

How much smaller does minifying CSS make it?

It depends on how much whitespace and how many comments the file has. Well-commented, indented stylesheets often shrink by roughly 20–40% before any server compression. Already-tight CSS saves less. The tool reports the exact bytes and percentage for your file. Remember gzip/brotli on your server usually saves more on top of this.

What's the difference between minifying and gzip?

Minifying removes comments and whitespace from the CSS text itself. Gzip/brotli is compression your server applies during transfer, which removes redundancy far more aggressively. For network transport, gzip usually saves more than minifying alone — but they stack, so minify then compress for the smallest transfer. Minifying is most valuable where compression isn't applied, or to keep files lean by default.

Does it remove unused CSS or merge rules?

No — it's a minifier, not an optimiser. It won't detect and remove unused selectors, merge duplicate rules, combine shorthand properties, or add vendor prefixes. Those transformations change the stylesheet's structure and need a dedicated tool like cssnano or PurgeCSS in your build. This tool only strips whitespace and comments, keeping every rule exactly as written.

Can I reverse it — beautify the CSS again?

Yes. Minifying only removes whitespace and comments, so you can expand it back into readable CSS at any time with the beautify option or the dedicated CSS Formatter. Note that beautifying re-indents from scratch and can't recover comments that minification removed — keep your original source if you need those.

Does it work with SCSS or LESS?

Not directly — it targets plain CSS. SCSS and LESS are preprocessor languages with their own syntax (variables, nesting, mixins) that must be compiled to CSS first; only then should you minify the output. If you paste raw SCSS/LESS, the tool may not handle preprocessor syntax correctly. Compile with Sass/Less, then minify the resulting .css.

Can I load a file instead of pasting?

Yes. You can open a local .css file and the tool reads it directly in your browser with the FileReader API — the contents load into the editor without being uploaded anywhere. This is handy for larger stylesheets or ones you'd rather not copy and paste, and it's exactly as private as pasting the CSS by hand.

Is it free, and are there limits?

Yes, completely free — no payment, no signup, no account, and no usage caps or watermarks. Since everything runs in your browser, there's nothing for us to meter; the only practical limit is your device's performance on very large stylesheets. Use it as much as you like, including offline once the page has loaded.

Still have questions?

If you can't find the answer you're looking for, feel free to contact our support team.

Contact Us