CSS Minifier & Beautifier

Minify CSS for production or beautify for readability.

What It Does

What Gets Removed During Minification

Example

Tips

Frequently Asked Questions

How much does CSS minification reduce file size?
Minification typically reduces CSS file size by 20–50%. Removing comments, whitespace, and unnecessary semicolons can shrink a 100 KB stylesheet to 60–80 KB, noticeably improving page load speed, especially on mobile connections.
Does minified CSS work the same as the original?
Yes. Minification is a lossless transformation — it only removes characters that have no effect on how the browser parses styles (whitespace, comments, redundant semicolons). The rendered output is identical.
What is the difference between minify and beautify?
Minify compresses CSS for production use by removing all unnecessary characters. Beautify (also called "prettify" or "format") does the opposite — it adds consistent indentation, line breaks, and spacing to make CSS easier to read and edit.
Should I minify CSS before or after adding vendor prefixes?
Add vendor prefixes first (e.g., using Autoprefixer), then minify. Minifying first can occasionally interfere with tooling that needs to parse the CSS structure. Most build pipelines run PostCSS → Autoprefixer → minification in that order.
Can I minify CSS in my build pipeline instead of manually?
Yes. Tools like cssnano (PostCSS plugin), LightningCSS, esbuild, and Vite all minify CSS automatically during build. Use this online tool for quick one-off checks or when you need to inspect the minified output without setting up a full pipeline.