Home › Developer Tools › CSS Minifier

Free Online CSS Minifier — Shrink Your Stylesheets in Seconds

Paste your CSS and get an optimized, compressed version instantly. Smaller stylesheets mean faster page loads, lower bandwidth bills, and better Core Web Vitals — all processed in your browser, never uploaded anywhere.

0 B
Original size
0 B
Minified size
0%
Saved
Your minified CSS will appear here.
100% Private

Your CSS never leaves your browser. No uploads, no tracking, no storage.

No Signup Needed

Open the page and start minifying. No accounts, no email walls.

Free Forever

Unlimited minifications, no size caps, no watermarks — free for everyone.

How to use the CSS minifier

  1. 1
    Paste your CSS

    Drop your full stylesheet (or a snippet) into the "Original CSS" box on the left.

  2. 2
    Pick your options

    Choose whether to strip comments, drop the last semicolon, shorten hex colors, or keep line breaks per rule.

  3. 3
    Minify & compare

    Hit "Minify CSS" and check the live size readout: original bytes, minified bytes, and your exact percentage saved.

  4. 4
    Copy or download

    Copy the output to your clipboard or download it as a ready-to-deploy .css file.

Why minify your CSS?

Faster page loads

Smaller stylesheets download quicker, especially on mobile connections — a direct win for your Lighthouse performance score.

Lower bandwidth costs

Every byte stripped saves bandwidth on every single page view. On high-traffic sites, that adds up to real money.

Safe, smart compression

Quoted strings, URLs, and data URIs are protected during minification, so your content and images are never corrupted.

Hex color shortening

Optionally compresses 6-digit hex colors like #aabbcc into #abc — valid CSS, roughly 3 bytes saved per color.

Full control

Keep comments for licensed code, keep trailing semicolons for easier diffs, or keep line breaks for a readable-but-compact output.

Works offline

Everything runs in JavaScript in your browser tab. No server round-trips, no queues, no waiting.

CSS minifier FAQs

What does a CSS minifier do?
A CSS minifier removes everything a browser doesn't need to render your styles: comments, extra whitespace, line breaks, unnecessary semicolons, and long-form hex colors. The result is valid CSS that looks identical in the browser but downloads faster.
Is it safe? Will minifying break my styles?
Yes, it's safe. This minifier protects quoted strings, URLs, and data URIs from being altered, and it only removes syntax that CSS parsers don't require. Always keep a copy of your original stylesheet, though — minified CSS is meant for production, not for editing.
How much smaller will my CSS get?
Typical stylesheets shrink by 20–40%. Heavily commented or loosely formatted CSS can shrink by 50% or more. The tool shows you the exact bytes and percentage saved for your input.
Should I remove the last semicolon in each rule?
It's valid CSS and saves one byte per declaration block. Keep it if you frequently hand-edit or diff the file; remove it for maximum compression.
Does this tool support @media queries and keyframes?
Yes. Media queries, keyframes, @font-face, and other at-rules are minified along with everything else — only whitespace and comments are touched, never the logic.
Is my CSS sent to a server?
No. All minification happens locally in your browser with JavaScript. Your code never leaves your device.
What's the difference between minifying and gzipping?
Minification shrinks the source file; gzip (or Brotli) compresses it further during transfer. Use both together: minify first, then let your server or CDN apply compression for the smallest possible delivery.
Scroll to Top