CSS Minifier
Runs locallyCompress CSS stylesheets while preserving calc() expressions and showing byte savings.
What is CSS Minifier?
Strip comments and unnecessary whitespace from CSS stylesheets while keeping calc() expressions, strings, and data URIs intact.
How to use CSS Minifier
- Step 1
Paste CSS into the input editor.
- Step 2
Inspect byte savings in the status bar.
- Step 3
Copy or download the minified .min.css file.
Features
- Preserves calc() operator spacing and quoted URLs
- Strips block comments cleanly
- Exact byte savings percentage indicator
- Instant switch to Format, Sort, or Tailwind mode
- 100% client-side execution
Example
Input
/* card */
.card {
width: calc(100% - 2rem);
padding: 1rem;
}Output
.card{width:calc(100% - 2rem);padding:1rem}Removes comments and whitespace without breaking calc() spacing.
Frequently asked questions
Will this break calc(100% - 20px)?
No. Spacing inside parentheses for math functions is preserved.
Are my CSS files uploaded?
No, everything runs locally in your browser.
Can I sort properties before minifying?
Yes, use the Sort mode or CSS Formatter options.
Does it support CSS variables?
Yes, custom properties (--var) and OKLCH colors are preserved cleanly.
Related tools
CSS Formatter & Minifier
Format or minify CSS/SCSS, sort properties, compute specificity and convert to JS or Tailwind.
HTML Minifier
Minify HTML markup safely while preserving preformatted blocks and tracking byte savings.
PX to REM & Fluid Clamp Calculator
Convert px, rem, em, pt, vw, vh and % with Tailwind scale, fluid clamp() and type scales.