Paste your CSS below and get a minified version instantly. Comments, whitespace, and redundant declarations are removed client-side — your code never leaves your browser.
CSS minification strips all characters from a stylesheet that are not required for it to function correctly — this includes whitespace, newlines, comments, and redundant semicolons. The browser doesn't care whether your CSS is beautifully formatted or a single long line; it renders the same either way. Minified CSS, however, downloads and parses noticeably faster.
Beyond simple whitespace removal, a smart CSS minifier can also shorten six-digit hex colors to their three-character equivalents (e.g. #ffffff → #fff), collapse 0px to 0, merge equivalent selectors, and remove duplicate properties. On large projects these micro-optimisations add up quickly — savings of 20–40% are common.
.min.css
/* … */)
0px → 0, #ffffff → #fff
--color-primary are preserved as-is:root blocks and variable declarations remain intactAbsolutely. Serving unminified CSS in production is unnecessary overhead — the browser gains nothing from the extra whitespace. For most projects the right workflow is: write readable source CSS (or SCSS/Less) → process through a build tool like Vite, webpack, or PostCSS → serve the minified output. Combined with gzip or Brotli compression, minified CSS files are typically 60–80% smaller than the original.
This tool is especially handy for quick one-off tasks: stripping a third-party stylesheet you can't change in your build pipeline, compressing a small snippet for an email template, or simply checking how much a file could be reduced before setting up a full build system.