Compress a stylesheet by removing comments, line breaks, indentation, and other characters the browser does
not need. The minifier works on the structure of the CSS rather than blind find-and-replace, so text inside
quotes, url() values, calc() expressions, and descendant selectors are never
broken.
#ffffff → #fff, 0.5em → .5em, no final semicolon, empty rules removed./*! ... */ comments stay unless you untick the option.
Spaces that change meaning are kept. div :first-child (any first child inside a div) is
different from div:first-child (a div that is a first child), and calc(100% - 10px)
needs the spaces around the minus sign. Strings, url() values, and custom property values are
never rewritten.
For a one-off file or a quick size check, this tool is enough. For a production site, add a minifier such as cssnano or Lightning CSS to your build so every deploy is minified automatically, and serve the files with gzip or Brotli compression. Learn more in our guide: How CSS Minification Works.
Need the reverse? Format minified CSS back to readable with the CSS Beautifier.
100% client-side: your code is never uploaded.