Skip to content
My Tiny Utils

Search tools

Type to find a tool, then press Enter to open it.

CSS Minifier

Minify CSS by removing comments, collapsing whitespace, and dropping trailing semicolons — strings and url() values preserved.

Processed locally in your browser — nothing is uploaded.

0 characters

Minified CSS

Output appears here…

About CSS Minifier

Removes comments, squeezes out whitespace that CSS grammar makes insignificant, and drops the last semicolon in every block. The result is byte-for-byte equivalent to the browser.

Care is taken where naive minifiers break things: spaces inside calc() stay, the space before a pseudo-class in a selector stays, url() contents and quoted strings are copied verbatim, and /*! licence comments are kept.

Common uses

  • Compress a hand-written stylesheet for a site with no build pipeline
  • Squeeze critical CSS down before inlining it in a page's head
  • Check how much of a stylesheet's size is comments and formatting

Example

Input

.a , .b {
  color: red;
  margin: 0 auto;
}

Output

.a,.b{color:red;margin:0 auto}

Limitations

  • Whitespace-level only: colours are not shortened, shorthand is not rewritten, and duplicate rules are not merged