Developer Tools Runs in your browser Free · no account

CSS Minifier

The CSS minifier strips comments and unnecessary whitespace, removes the final semicolon in each block and shortens obvious values such as 0px to 0, reporting the size saved. It never reorders or merges rules, so the cascade is untouched.

Options
CSS 0 characters
Minified CSS

Your result will appear here.

Not sure where to start? Use Load example.

Results update automatically and are calculated on your device. Nothing you type is sent to a server.

Runs in your browser. Processing happens entirely in your browser. Nothing you enter is sent to Delimiter.live.

How to use the CSS Minifier

  1. Paste the stylesheet you want to compress.
  2. Leave value shortening on unless you need byte-identical values.
  3. Check the size saving and copy or download the result.

Example

Input
.a {
  color: #ffffff;
  margin: 0px;
}
Output
.a{color:#fff;margin:0}

Common use cases

  • Compressing a small stylesheet in a project with no build step.
  • Preparing critical CSS to inline in the page head.
  • Reducing the size of styles stored in a CMS or an email template.

Limitations and things to watch for

  • Only safe transformations are applied. Rules are never merged, reordered or deduplicated, because doing so can change the cascade in ways that are hard to predict.
  • Comments starting with /*! are preserved, which is the convention for licence headers.
  • As with all minification, gzip or Brotli on the server saves considerably more.

Frequently asked questions

Is minified CSS still valid?
Yes. Only insignificant whitespace, comments and redundant characters are removed, so browsers parse the result identically.
Does it merge duplicate rules?
No, deliberately. Merging or reordering rules can change which declaration wins in the cascade, so this tool restricts itself to changes that cannot alter rendering.
Are licence comments kept?
Yes. Comments beginning with /*! are preserved, following the convention every major minifier uses.

Share this tool