CSS Minifier & Beautifier

Minify or beautify CSS. Remove comments, collapse whitespace, shorten values. Shows compression percentage saved.

Free Always No Account Needed 100% Client-Side

About this tool

CSS performance matters — every kilobyte of CSS blocks rendering. Minification removes unnecessary characters without changing the visual output.

CSS Minifier removes: - Comments - Redundant whitespace and newlines - Optional semicolons and braces - Unnecessary units (0px → 0) - Shorthand expansion (margin: 0 0 0 0 → margin: 0)

CSS Beautifier reformats compressed or minified CSS with proper indentation, newlines after each declaration, and consistent spacing. Turn a single-line production CSS file back into readable source.

Shows the original and compressed sizes with a savings percentage. Supports standard CSS, including custom properties (CSS variables), media queries, @keyframes, @supports, and modern selectors.

Frequently Asked Questions

Is CSS minification lossless?
Yes. Minification only removes characters that are syntactically optional — the browser renders identically minified or not.
How much does CSS minification save?
Typically 20-40% for hand-written CSS. Well-written CSS with few comments saves less; CSS with lots of whitespace and comments saves more.
Does it support CSS variables?
Yes. Custom properties (--color: #fff) are preserved correctly. Values inside var() are not modified.
What about vendor prefixes?
Vendor prefixes (-webkit-, -moz-, etc.) are preserved as-is. Use a tool like Autoprefixer to add or remove them.

Related Tools