CSS Minifier
Minify CSS by removing comments, extra whitespace and line breaks. Reduces file size without changing behavior.
—
Fewer CSS bytes, right in the browser
You have a block of CSS full of comments and indentation and want the compact version to inline in a style tag, drop into an HTML email or fit into a size-limited field, without installing anything or setting up a build. Just paste it: the minified output updates as you type, with byte counts before and after and the percentage saved shown right above the result.
Under the hood this is regex-based minification, not a parser: the tool strips comments, collapses whitespace and line breaks, and removes spaces around braces, colons, semicolons, commas and combinators. It does not rewrite values, so #ffffff does not become #fff and 0px does not become 0. And because it has no notion of context, there is one real gotcha with calc(): spaces around the + sign get removed, and calc requires whitespace around + and -, so calc(100% + 20px) comes out invalid.
It works well for everyday stylesheets: selectors, properties, media queries. Before shipping the result, check two spots: calc() expressions with addition or subtraction, which need their spaces put back by hand, and strings in the content property, which can lose internal spaces around commas. For a production pipeline, a parser-based minifier like cssnano optimizes further without those risks. Nothing you paste ever leaves your browser.
Frequently asked questions
Can the minification break my CSS?
How much can I actually save?
Does the CSS I paste go to a server?
Related Tools
HTML Minifier
Minify HTML by removing comments and collapsing whitespace between tags while preserving <pre>, <code> and <textarea> content.
JS Minifier (basic)
Minify JavaScript by stripping line/block comments and extra whitespace. Works for simple code without full AST parsing.
CSS Clamp Calculator
Generate CSS clamp() values for fluid typography and spacing. Enter minimum/maximum sizes and viewport widths to get a ready-to-paste clamp() function.