Skip to content

Minify CSS online

Paste CSS to remove comments and unnecessary whitespace while keeping every rule intact, with the exact size saving shown.

Minified output
This is a conservative, rule-based minifier: it removes comments and extra whitespace without renaming variables or rewriting code. It is safe for everyday use, but a full bundler (like Terser or esbuild) shrinks production code further.

Your text is processed in your browser as you type. It is not sent to ToolsNest servers or stored after you leave the page.

How to use the CSS Minifier

  1. 1Paste your CSS.
  2. 2Read the minified output.
  3. 3Copy the result.

Supported formats and limits

  • Removes /* */ comments and whitespace around selectors and declarations.
  • Never merges or rewrites rules, so behaviour is unchanged.

Common uses

  • Shrinking a stylesheet for a small site.
  • Cleaning up CSS copied from a generator.
  • Quick savings without a build step.

Frequently asked questions

Will it break my CSS?

The rules are deliberately conservative: only comments and safe whitespace are removed. Still, keep the original as your source.

Related tools