CSS Minifier
Remove comments, whitespace and redundant syntax from CSS while preserving behavior: strings, url(), calc()/min()/max()/clamp() bodies, pseudo-selectors and /*! license comments stay intact. Shorten values (0px → 0, #ffffff → #fff), optionally merge rules with identical selectors, see real gzip sizes, and get precise errors for unbalanced braces.
/*! FizzKit landing page styles — license header is preserved */.hero{padding:80px 32px;background-color:#fff;color:#111827}.hero h1{font-size:48px;line-height:1.1;margin-bottom:24px;font-weight:600}.hero .cta{display:inline-flex;align-items:center;gap:8px;width:calc(100% - 2*16px);background:#6366f1 url("img/sparkle.png") no-repeat;color:#fff;padding:12px 24px;border-radius:8px;transition:all .15s ease-in-out}.hero .cta::after{content:" → "}.hero .cta:hover{background-color:#4f46e5;transform:translateY(-1px)}.hero{margin:0 auto}@media (prefers-color-scheme:dark){.hero{background-color:#0a0a0a;color:#fafafa}}Strings, url(), calc()/min()/max()/clamp() bodies and pseudo-selectors are preserved as written. Unbalanced braces are reported with the offending line. Need it pretty-printed? Use the HTML / CSS Prettifier's Beautify mode.
Related tools
JavaScript Minifier
Minify JavaScript with Terser or beautify JS/TS with Prettier — with real gzip sizes.
JSON Minifier
Minify JSON, strip nulls, measure gzip size and encode as Base64 or URL-safe text.
HTML / CSS Prettifier
Beautify or minify HTML, CSS, SCSS, Less, JS, TS, JSON, YAML, Markdown and more — with preview and lint.
SQL Formatter
Format, minify and highlight SQL for 14 dialects with placeholder substitution.
How to use CSS Minifier
- 1Paste or upload CSS — the minified output and the size savings appear immediately.
- 2Toggle value shortening and comment retention; /*! license */ comments are always kept.
- 3Enable duplicate-selector merging to combine repeated rules (also inside matching @media blocks), then check the output.
- 4Fix any unbalanced brace the tool points to by line number, then copy or download styles.min.css.
About CSS Minifier
Remove comments, whitespace and redundant syntax from CSS while preserving behavior: strings, url(), calc()/min()/max()/clamp() bodies, pseudo-selectors and /*! license comments stay intact. Shorten values (0px → 0, #ffffff → #fff), optionally merge rules with identical selectors, see real gzip sizes, and get precise errors for unbalanced braces.
CSS Minifier is part of FizzKit — a collection of focused developer and ad-tech tools. Because everything runs locally, it works offline once loaded and never exposes your data to a remote server.