Developer Tools

CSS Minifier

Compress CSS by stripping comments and whitespace to cut file size. See exactly how many bytes you saved.

Tool

About the CSS Minifier

The CSS Minifier runs entirely in your browser — your data never leaves your machine. Paste, click and copy the result.

Every byte of CSS is a byte your visitors must download. This minifier strips comments, collapses runs of whitespace and removes the spaces around braces, semicolons and commas to produce the smallest equivalent stylesheet.

How to use this tool

  1. Paste your stylesheet into the input box.
  2. Leave “Remove comments” ticked to drop /* … */ blocks.
  3. Click Minify CSS and copy the compressed output.
  4. Check the stats line to see the size saving.

What gets removed

  • Comments beginning with /*.
  • Extra spaces, tabs and blank lines.
  • Spaces around { } ; , and combinators.
  • The final semicolon before a closing brace.

Developer tip

Always keep an unminified copy as your source of truth — minified CSS is hard to edit by hand. Build tools such as PostCSS and esbuild can minify automatically in a pipeline.

Who is this tool for?

Front-end developers shaving kilobytes off stylesheets, and anyone inlining critical CSS for faster page loads.

Frequently asked questions

No. The tool only removes comments and insignificant whitespace, leaving selectors and declarations unchanged.
Typically 15–40%, depending on how many comments and how much indentation your original stylesheet contains.
No. It is a safe whitespace-and-comment minifier and never alters identifiers.

Related tools

Guides for this tool