Skip to tool

CSS Minifier

▸About this tool

Remove comments and collapse whitespace from CSS to reduce file size. See the exact bytes saved. Runs entirely in your browser.

▸Privacy and details

Fast browser processing with no account required.

Optimized for desktop and mobile with accessible controls.

▸How to use
  1. Paste your CSS into the input area.
  2. The minified output appears instantly with the bytes saved shown below.
  3. Click "Copy CSS" to copy the minified stylesheet to your clipboard.
  4. Or click "Download .css" to save the minified file directly.
▸Why use this tool

Serving minified CSS reduces page load times by decreasing file size. This tool performs safe transformations (removing comments and collapsing whitespace) that are lossless for CSS behaviour.

Frequently Asked Questions

How does CSS minification work?

The tool removes all comments (/* ... */), collapses consecutive whitespace into single spaces, and removes unnecessary spaces around punctuation characters like {, }, :, ;, and ,.

Will minification break my CSS?

For standard CSS, no. The minifier uses safe transformations that preserve all selectors, properties, and values. It does not perform structural changes like merging rules.

How much size reduction can I expect?

Typical reduction is 20-40% depending on how many comments and how much whitespace are in the original. Heavily commented stylesheets see the largest savings.

Can I minify CSS variables and custom properties?

Yes: CSS custom properties (--my-var) and all CSS features including animations, media queries, and pseudo-selectors are handled correctly.

Is my CSS sent to a server?

No. Minification runs entirely in your browser. Your stylesheet is not sent to a NixRey server.