Request a tool
DEVELOPER TOOLS · FREE ONLINE TOOL

CSS Minifier

Shrink stylesheets safely with string-aware comment strippingShipping a stylesheet full of comments, indentation and blank lines means shipping bytes your visitors pay to download on every visit. This minifier rewrites the file into its smallest valid form: comments removed, whitespace collapsed, one dense block.

✓ Free to use✓ No sign-up✓ Ready in your browser
// CSS MINIFIER · GET STARTED

Use CSS Minifier

Shrink stylesheets safely with string-aware comment stripping

Options

// CSS MINIFIER · HOW IT WORKS

How to use the CSS Minifier

01

Paste CSS

Paste your CSS into the box.

02

Pick options

Toggle hex shortening and zero-unit options.

03

Minify and copy

Click "Minify CSS", then copy or download the result.

// CSS MINIFIER · ABOUT THIS TOOL

About the CSS Minifier

Stylesheets accumulate comments, indentation, and verbose values that browsers simply do not need. This minifier removes them with a string-aware parser, so your CSS shrinks without changing how it behaves.

Pair the output with GZIP or Brotli on your server and the payload shrinks dramatically.

Where it helps most

Real savings, not theoretical.

Large theme files

On a site with a large theme file, tens of kilobytes less on every page load shows up in Core Web Vitals and on slow mobile connections.

CMS custom CSS

A quick fix to a WordPress theme or styles pasted into a CMS custom CSS box, where automation never reaches.

HTML email templates

Email templates where every byte counts against strict provider size limits.

One-off deploys

Paste, minify and ship the compressed copy when configuring a build pipeline would take longer than the task.

Minifying safely

What gets removed, what stays.

Comments and whitespace

Comments removed, whitespace collapsed, the final semicolon of each rule dropped, and hex colors shortened.

Valid syntax only

Minification only removes what CSS syntax allows, so valid styles keep working exactly as before.

Keep the source

Never treat the compressed file as the editable original; regenerate after each change and test the page once.

CSS Minifier: private by design

Paste, minify, copy. Everything happens in your browser; your stylesheet never leaves your device.

// CSS MINIFIER · COMMON QUESTIONS

CSS Minifier FAQs

Most stylesheets shrink by 20 to 40 percent. Files heavy with comments, indentation, and blank lines compress the most, while already-tight files save less. The biggest wins come from large theme files and frameworks shipped with full source formatting.