What does CSS minification do?
CSS minification removes everything that is not needed to render styles correctly: comments, extra whitespace, newlines, redundant semicolons, and zero-value units. It also optimizes values — converting verbose color functions to shorter hex codes, collapsing redundant box shorthand values, and removing units from zero values. The result is identical visual rendering with a smaller, faster-to-transfer file. Whitespace, comments, and redundant semicolons are removed first, then property values are shortened and duplicate rules merged.
How much does CSS minification reduce file size?
Typically 20-40% for hand-written CSS with comments and formatting. Combined with gzip or Brotli compression at the server level, total savings often reach 80-90%. A 50 KB stylesheet can commonly become under 10 KB delivered over the network. Typical savings range from 15-40% depending on how much whitespace, comments, and verbose shorthand the original contains. Production stylesheets with lots of comments and developer-friendly spacing tend to see the largest savings.
Why does CSS file size matter for performance?
CSS is render-blocking — the browser must download and parse all stylesheets before it can paint any content. Larger CSS files mean a longer blank screen. Reducing CSS size directly improves First Contentful Paint (FCP) and Largest Contentful Paint (LCP), which are Core Web Vitals that affect both user experience and Google search rankings. Every kilobyte saved in a stylesheet reduces the render-blocking resource load and speeds up the browser's first paint.
How does the color optimization work?
Three color passes run: 6-digit hex codes like #aabbcc are shortened to 3-digit #abc where possible; rgb() and rgba() values are converted to their shortest hex equivalent; and safe named colors like red, white, and black are replaced with shorter hex codes where the hex is fewer characters. All optimizations are mathematically exact — no approximation. Color shortening and value collapsing are applied only when the result is guaranteed to render identically in every browser.
What CSS shorthand optimizations are applied?
Box properties with redundant values are collapsed: margin:10px 10px 10px 10px becomes margin:10px, padding:8px 16px 8px 16px becomes padding:8px 16px, and border-radius:8px 8px 8px 8px becomes border-radius:8px. The optimizer handles margin, padding, border-radius, border-width, border-color, and inset. These multi-value properties are collapsed to their shortest valid representation, cutting several bytes per occurrence. On large stylesheets with many rules, shorthand collapsing alone can save hundreds of bytes.
What is duplicate selector detection?
If the same CSS selector appears more than once, the second block silently overrides all conflicting properties from the first — which is almost always a bug. The Report tab flags every selector defined more than once so you can intentionally merge them. Most other online CSS minifiers do not include this check. Duplicate selectors are a common result of copy-paste authoring or merging multiple CSS files into one.
Is my CSS sent to any server?
No. All minification runs entirely in your browser using JavaScript. Nothing is transmitted to any server. Your CSS code never leaves your device. The minifier runs entirely in your browser using a JavaScript parser -- no uploads, no accounts, no logs. Paste your CSS into the tool above and the minified result is ready to copy within milliseconds. Minification happens instantly in your browser -- paste your CSS and the minified result appears within milliseconds.
Is the minified CSS still valid?
Yes — fully valid CSS. Every rule, property, and value is preserved exactly. Only whitespace, comments, and redundant syntax are removed. The minified output renders identically to the original in all browsers. Only whitespace-level and value-level transformations are applied -- no structural changes that could affect specificity or cascade order. Whitespace removal, comment stripping, and value shortening are the only transformations applied, preserving full CSS semantics.
When should I use this vs a build tool like PostCSS or esbuild?
For production deployments with a build pipeline, use PostCSS with cssnano, esbuild, or Vite — they minify automatically on every build. Use this tool for quick manual work: reviewing output on specific files, auditing stylesheets for duplicate selectors, checking how much a file can be reduced, or minifying CSS without setting up a build tool. For one-off minification tasks or quick checks, this browser tool is faster than configuring PostCSS or a webpack pipeline.
What is the difference between CSS minification and CSS compression?
CSS minification removes redundant characters at the source level — the output is still valid, human-readable CSS. CSS compression refers to gzip or Brotli encoding applied by the web server at transfer time. Both are complementary — minify the source first, then let the server compress the transfer. This tool handles minification. Minification and compression are complementary -- use both together for the smallest possible payload delivered to the browser.