convert

CSS Minifier

Minify CSS by stripping comments and whitespace to shrink stylesheets.

Runs on your deviceBatch readyPaste textNew

Paste or drop

Paste text below, or drop a file instead.

0 chars · 0 lines
…or drop a file
Drag and drop, or choose files
CSSTXT

Choose an output

Minify CSS by stripping comments and whitespace to shrink stylesheets.

Fine-tune

Optional — sensible defaults are already set.

About CSS Minifier

This minifier strips comments, line breaks and unnecessary spaces from CSS and removes the last semicolon in each rule. String contents are left untouched, and the result summary shows the size before and after.

When it helps

  • Shrinking a hand-written stylesheet for a static site that has no build step.
  • Minifying CSS before inlining it in a <style> tag or an HTML email.
  • Reducing the size of a theme or widget stylesheet you distribute.

Tips

  • Comments that start with /*! are kept by default, since they usually hold license notices. Turn off the option to remove them too.
  • Spaces in selectors are only removed where it is safe, so a :hover (descendant) and a:hover (same element) keep their different meanings.
  • This removes whitespace and comments only. It does not merge rules, shorten colors or drop unused selectors, which build tools like cssnano or Lightning CSS do.

Good to know

Quick answers about css minifier in your browser.

Removing whitespace and comments does not change how CSS is interpreted, as long as the original is valid. Keep the unminified source for editing.

It still helps a little, since comments are removed entirely, but compression already handles most repeated whitespace. Both together give the smallest transfer.

Yes. There is no sign-up, no watermark and no limit on how many files you process.

No. Files are read and processed locally in your browser, so they never leave your device.

Related tools