← All tools

DEVELOPER TOOL

CSS Minifier

Reduce CSS whitespace and remove ordinary comments while preserving selectors and strings.

Your minified CSS will appear here.

Minification runs locally in your browser. Ordinary comments are removed, important comments and strings are preserved, and other whitespace is collapsed conservatively. This is not a full CSS parser or validator.

This lightweight minifier is not a full CSS parser and does not remove every optional space because whitespace can affect selectors, calculations, and custom properties. Review the output before using it.

CSS is minified locally in your browser and is not uploaded.

How to use CSS Minifier

  1. Paste CSS into the input panel.
  2. Select Minify CSS to create a compact version.
  3. Copy the result or edit the input to start again.

Does the minifier remove all comments?

Ordinary comments are removed. Comments beginning with /*! are preserved as potentially important notices.

Does it preserve spaces in strings and functions?

String contents are kept unchanged. Other whitespace is collapsed conservatively, including whitespace within functions.

Is my CSS uploaded?

No. Minification runs locally in your browser.