Small SEO Tools

CSS Minifier

Smaller stylesheets, same output. Free, no sign up, and everything happens inside your browser.

A stylesheet you can actually read is full of bytes the browser ignores: indentation, blank lines, comments, the semicolon before a closing brace, and colours written as six digits when three would do. This minifier removes all of that and reports the size before and after along with the percentage saved. It scans the CSS character by character rather than running blind regular expressions, so strings, url() values and long data URIs are copied through untouched.

The rewrites are conservative on purpose. Zero values lose length units such as px and rem but keep time units, because a duration of zero still needs its s or ms to stay valid. Numbers below one lose the leading zero, so 0.5 becomes .5. Colours written as three repeated pairs collapse to the short form. Comments starting with an exclamation mark, the convention for licence headers, can be kept while every other comment is dropped.

How to use the CSS Minifier

  1. Paste your CSS into the input box. A whole stylesheet or a single rule both work.
  2. Leave the options ticked for the standard result, or untick any rewrite you would rather skip.
  3. Click Minify CSS and check the original size, minified size and percentage saved.
  4. Click Copy, save the output as your production file, and keep the readable source for editing.

Frequently asked questions

Will minifying break my stylesheet?

It should not. Strings, url() values and data URIs are protected before any rewriting happens, and spaces around plus and minus are never removed so calc expressions stay valid. If a rule does misbehave, untick the individual options one at a time to find which rewrite caused it.

Why are zero seconds not shortened to plain zero?

Length units are optional on a zero, so 0px and 0 mean the same thing. Time is different: transition and animation properties require a unit, so 0s stays as it is. The tool only strips length units such as px, em, rem, vw and vh.

What is a bang comment and why keep it?

A comment that starts with an exclamation mark, written as slash star bang, is the usual convention for licence and attribution headers. Most minifiers preserve it so the legal notice survives. Untick the option if you want every comment removed regardless.

How much smaller will my CSS get?

A heavily commented and indented stylesheet often drops 20 to 30 percent. The exact number appears in the stats row after each run. Enabling gzip or brotli on your server typically saves more than minification alone, and the two combine, so use both.