Skip to content
T
Tools.Town
Free Online Tools for Everyone
30% smaller

CSS Minifier

100% Free

Compress CSS using Yandex's csso engine — removes whitespace, comments, merges rules, dedupes selectors, compresses colors.

Real-time
Client-Side
csso engine
Minified
Minified CSS appears here…

Embed This Tool

Easy to Embed

Add CSS Minifier to your website or blog in seconds.

  • Responsive design
  • Lightweight & fast
  • No backend required
  • Always up-to-date
<iframe
  src="https://tools.town/embed/css-minifier/"
  width="100%"
  height="600"
  style="border:none; border-radius:12px;"
  loading="lazy"
  title="CSS Minifier">
</iframe>

Share This Tool

Share Instantly

Share CSS Minifier with anyone — no login required.

  • Shareable link
  • No login required
  • Works on any device
  • No account needed

Share via

Advertisement

How to Use

  1. 1 Paste CSS into the input
  2. 2 Toggle 'Restructure' for full optimisation (selector merge + dedupe)
  3. 3 Output updates instantly with byte savings shown
  4. 4 Copy minified CSS for production

Features

  • Whitespace + comment removal
  • Color compression (#ffffff → #fff)
  • Selector deduplication
  • Property merging within rules
  • Restructure toggle for safe vs aggressive optimisation
  • 100% client-side

Why it Matters

Every kilobyte of CSS slows the first paint. csso is one of the most aggressive minifiers — used by Yandex, Webpack plugins, and SVGO. Running it in-browser without a build step is useful for quick optimisations or when you can't add a build pipeline.

★★★★★

Use Cases

Pre-Production Squeeze

Squeeze the last few KB out of a stylesheet before shipping

CMS / WordPress

Minify hand-written CSS in WP custom-CSS panels

CDN Optimisation

Pre-minify static CSS before uploading to a CDN

Frequently Asked Questions

What's the difference between minify and restructure?
Minify (always on) strips whitespace and comments — safe. Restructure additionally merges duplicate rules and re-orders properties — usually safe, but can change cascade order in edge cases.
Will restructure break my CSS?
Rarely. csso is conservative — it only restructures when the result is provably equivalent. If you have inline-styled overrides that depend on specific cascade order, test before deploying.
Is this faster than running PostCSS + cssnano?
Different scope. PostCSS+cssnano is build-time and runs many passes. This is a one-shot in-browser pass — slightly less aggressive but instant.

Related Tools You Might Like

Browse more free tools