CSS Minifier
Strip comments and collapse insignificant whitespace from a bounded CSS snippet without parsing or rewriting it.
This tool handles input and primary processing in your browser and is designed not to send the input to QuickKit’s server.
Minified CSS
How it works
This is a conservative, structural minifier — not a CSS optimizer. It removes comment text (keeping a leading /*! license banner) and collapses whitespace, dropping spaces around { } ; and , and the last semicolon before a closing brace. Because CSS comments are token boundaries and not whitespace (CSS Syntax serialization rules), a comment is deleted outright only when a hard separator — whitespace or one of { } ) [ ] ; , — already sits beside it and no CSS escape could absorb the gap. `(` is not a hard separator because an ident directly followed by `(` is one function-token. Everywhere else the comment text is dropped but a minimal /**/ is kept in its place, so cases like @media/**/screen, 1/**/px, +/**/1, --a/**/b, #/**/id, \61/**/b and foo/**/( re-tokenize exactly as the input did. It deliberately does NOT strip spaces around the + ~ > combinators or : (calc(), :nth-child(2n + 1), descendant selectors), and it does not shorten colors, units, or hex, merge rules, or reorder declarations. Strings and url() tokens (including their internal whitespace) are preserved byte-for-byte. Input is capped at 512 KiB. For production builds, use a real optimizer such as Lightning CSS or cssnano in your bundler.