jsonecho

CSS Minify

Remove comments and whitespace to get the smallest CSS.

Loading the tool...

How to use CSS Minify

  1. Paste your CSS.
  2. Copy the minified result.

About CSS Minify

Minifying CSS removes the characters that humans need and the browser does not: comments, line breaks, indentation and the last semicolon in a rule. The savings are typically 20 to 40 percent before compression.

This is a safe, conservative minifier. It does not merge rules, shorten colours or rename anything, so the cascade stays exactly as you wrote it.

Frequently asked questions

Does it shorten colour values or merge selectors?

No. It only removes whitespace and comments, which cannot change how the stylesheet behaves.

Is it safe for calc() expressions?

Spaces around + and - inside calc() are required by the spec. If you use calc(), check that the result still has them.

Can I get readable CSS back?

Yes, use the CSS Formatter on the minified text.

More in Code Formatters

All tools →