Compress a stylesheet in your browser: comments, surplus whitespace, duplicate semicolons and empty rules go, colours and numbers get shortened. Nothing is uploaded.
Input size0 B
Output size0 B
Saved0%
Blocks kept0
Comments removed0
Empty rules removed0
What this CSS minifier does
Paste a stylesheet and this tool compresses it: comments, repeated whitespace, duplicate semicolons, empty rules and the last semicolon of every block are removed, colours such as #FFFFFF become #fff, and numbers such as 0.50 become .5. It works context-aware — a value inside url(...) or a CSS custom property declared as --name is left alone, and a hex value in a selector (an ID) is never shortened, because that would change which element is styled. Strings, calc() expressions and media features keep the whitespace they need. The result appears while you type, with byte counts before and after, the number of removed comments and empty rules, and copy plus download. Unclosed braces, unterminated comments and stray closing braces are reported instead of silently swallowed. Everything runs in your browser, so the CSS never leaves your device.
Was dieser CSS-Minifier macht
Stylesheet einfügen und dieses Tool komprimiert es: Kommentare, mehrfacher Leerraum, doppelte Semikolons, leere Regeln und das letzte Semikolon jedes Blocks entfallen, aus #FFFFFF wird #fff, aus 0.50 wird .5. Es arbeitet kontextbewusst — Werte in url(...) oder in eigenen Properties (--name) bleiben unverändert, und ein Hex-Wert in einem Selektor (eine ID) wird nie gekürzt, weil sich sonst ändert, welches Element gestylt wird. Strings, calc()-Ausdrücke und Media-Features behalten den Leerraum, den sie brauchen. Das Ergebnis erscheint beim Tippen, mit Byte-Zahlen vorher und nachher, der Anzahl entfernter Kommentare und leerer Regeln sowie Kopieren und Download. Nicht geschlossene Klammern, offene Kommentare und überzählige schließende Klammern werden gemeldet statt still verschluckt. Alles läuft im Browser: das CSS verlässt Ihr Gerät nicht.