CSS Minifier

Compress CSS by removing whitespace and comments without changing behaviour.

Paste CSS and get a minified version with comments, redundant whitespace, and unnecessary characters stripped. The cascade order and computed values are preserved exactly — only the file size changes.

Common use cases: shrinking a legacy stylesheet without setting up a build pipeline, eyeballing how much you'd save, prepping inline <style> blocks for email templates, and minifying snippets pasted into CMSes.

CSS Input

Reference

Minification Info
• Removes all comments
• Strips unnecessary whitespace
• Removes line breaks and indentation
• Reduces file size by 20-50%
• Preserves CSS functionality

Frequently asked questions

What does CSS minification actually remove?
Comments, redundant whitespace between selectors and properties, the final ; in a rule block, leading zeros in decimal values (e.g. 0.5.5), and matched-pair whitespace inside calc()/var(). Selectors, property names, and values themselves are preserved.
Will the minified output behave identically?
Yes. Minification is whitespace-and-comment only — the cascade order, specificity, and computed values stay identical. If a minified file behaves differently in the browser, that's a bug in the minifier and worth reporting.
How much smaller will my file get?
Typical savings are 15–25% on hand-written CSS, less on already-compressed framework output (Tailwind v4 emits near-minimal CSS even unminified). For best results, also gzip/brotli the output — those win another 70–80% on top of minification.
Should I commit minified CSS?
No — commit the human-readable source and minify at build time. Modern bundlers (Vite, Webpack, Astro) do this automatically. Use this tool for one-off snippets, legacy projects without a build step, or to inspect what minification will do.