CSS Minifier

CSS Minifier

Minify CSS by removing comments and unnecessary whitespace. Your strings stay intact, and you can see exactly how many bytes you saved.

Minified CSS will appear here.

About the CSS Minifier

The CSS Minifier shrinks a stylesheet by removing comments and whitespace that browsers do not need, such as spaces around braces, colons, and semicolons. Smaller CSS files download faster, which helps page speed.

The tool is careful with quoted strings: text inside single or double quotes, such as font names and content values, is copied exactly and never changed.

How to use

  1. Paste your CSS into the input box.
  2. Click Minify CSS.
  3. Check the before and after sizes and the percentage saved.
  4. Copy the result or download it as a .css file.

Key features

  • Removes comments and unnecessary whitespace
  • Keeps string contents exactly as written
  • Removes the last semicolon before a closing brace
  • Shows before and after sizes with percentage saved
  • Copy and download options

Frequently asked questions

Does minifying change how my CSS works?

No. Only comments and whitespace that do not affect the meaning are removed, so the styles behave the same way.

Are quoted strings safe?

Yes. Text inside single or double quotes is left untouched, including spaces inside font names and content strings.

What if my CSS has an error?

The minifier still processes the text, but it cannot fix broken CSS. Check that your stylesheet is valid before minifying it.

Why is my file only slightly smaller?

Already compact CSS has little to remove. The biggest savings come from stylesheets with many comments and long lines of indentation.

Is my CSS uploaded anywhere?

No. Minifying runs entirely in your browser and your code is not sent to any server.

Free to use, no signup needed. This tool runs entirely in your browser — your data never leaves your device.