← All tools

CSS Minifier

Minify CSS by stripping comments, collapsing whitespace, removing unnecessary spaces around {} ; : ,, and dropping trailing semicolons — while preserving the contents of strings and url() so nothing breaks. The reverse of the CSS formatter. Optionally shorten hex colors (#aabbcc#abc) and drop leading zeros (0.5em.5em). Everything runs in your browser; nothing is uploaded.

Conservative by default: only comments, whitespace, and unnecessary spacing are touched — string and url() contents are preserved verbatim. Hex / leading-zero shortening are opt-in (they're safe for values but can affect unusual unquoted url() filenames, so they're off until you turn them on). No network requests are made.