Search tools

CSS Minifier

Make stylesheets smaller and faster to load — not just whitespace removal, but structural optimisation.

CSS Minifier tool

Processing runs in your browser.

Every kilobyte of CSS blocks rendering until the browser has downloaded and parsed it. Minifying stylesheets is one of the simplest performance wins, and a structural optimiser like CSSO goes further than removing spaces by merging rules and shortening values.

Use it for

  • Sites without a build step, such as WordPress themes or static pages.
  • Critical CSS inlined in the page head, where every byte counts.
  • Email and embed styles with size limits.
  • Quick checks of how much a stylesheet could shrink.

Minify, then compress

Minification and server compression work together. Minifying removes characters that never needed to be there; gzip or Brotli on your server then compresses what’s left. A typical stylesheet ends up a fraction of its original size over the network. Keep your readable source file and minify a copy each time you publish.

How to use the CSS Minifier

  1. Paste CSS or open a .css file.
  2. Read the minified output and the size saving.
  3. Copy it or download it as a .min.css file.

Features

  • Powered by CSSO, a structural CSS optimiser.
  • Removes comments, whitespace and the last semicolon in each block.
  • Shortens values: #ffffff → #fff, 0px → 0, and padding: 10px 20px 10px 20px → 10px 20px.
  • Merges identical selectors and duplicate declarations where it’s safe.
  • Keeps /*! license */ style comments.

Frequently asked questions

Can minified CSS behave differently?

CSSO only applies transformations that keep the same rendering. If a rule seems to change, it’s usually because an earlier duplicate declaration was overriding it anyway.

How much smaller will my CSS be?

Typically 15–40%, depending on how many comments, duplicates and long values the stylesheet has.

Should I keep the original file?

Yes. Edit the readable version and minify it again for production. To read minified CSS later, use the CSS Beautifier.

Written by