CSS Minify

Drop a stylesheet into the editor and get a minified version with block comments removed and runs of whitespace squeezed to single spaces. Useful for a quick size check or when you need a compact snippet without running a full build.

Updated 2026-08-03 · developer

body { color: red; }

About this tool

Minification reduces transfer size by deleting comments and unnecessary whitespace. This tool is a lightweight browser pass—not a full CSS parser—so it will not rewrite selectors or shorten color values. Keep a formatted source elsewhere; treat the output as a compressed copy for delivery or comparison.

How to use

  1. Open CSS Minify: Open this page in your browser.
  2. Paste CSS: Put your stylesheet or fragment into the Code box.
  3. Copy the result: Take the compacted output from the result area.
  4. Verify in context: Paste into your page or bundler and confirm styles still apply.

Common use cases

Tips

FAQ

Does this rename classes or merge rules?

No. It only removes comments and collapses whitespace.

Are @media and nested rules preserved?

Structure stays as text; only comments and extra spaces are changed.

Is my CSS uploaded?

Processing runs locally in the browser.

Why might output look wrong?

Edge cases in comments inside strings can confuse a simple stripper—double-check important sheets.

Related keywords

Related tools