Free tools, no sign-up — everything runs in your browser.
ToolHub 1000Free online tools

CSS Minifier

Strip comments and extra whitespace from CSS while keeping quoted strings intact.

Quick answer: enter your details below and click Minify CSS — your result appears instantly, right here in your browser. Nothing you enter is uploaded or stored.
C
Developer

Enter your details below.

How to use

  1. Paste your CSS into the box.
  2. Click Minify CSS.
  3. Copy the compact result for use in a stylesheet.

About this tool

This tool removes CSS comments and collapses unnecessary whitespace, and it trims spaces around braces, colons, semicolons and commas. Quoted strings are protected first, so a URL or font name containing spaces is not broken by the stripping. It is a basic minifier: it does not rewrite selectors, merge rules or shorten colours, and very unusual CSS may need a full build tool instead.

Frequently asked questions

Will it break strings with spaces?

No. Quoted strings are set aside before whitespace is stripped and restored afterwards, so spaces inside them survive.

Does it shorten colours or merge rules?

No. This is a basic whitespace and comment minifier only; it does not rewrite selectors, values or colours.

Related tools

All tools · Read the guide: CSS Minifier