Code tool

CSS Minifier

Paste a stylesheet, remove safe formatting overhead locally, and copy or download a compact CSS result without uploading your code.

In-browser processingNo account requiredPrivacy details ↗

Up to 500,000 characters. Processing stays in this browser.

A QUICK WALKTHROUGH

How to use this tool

  1. Paste CSS into the editor or try the included sample.
  2. Choose whether to remove comments and inspect the before and after sizes.
  3. Copy the minified stylesheet or download it as a CSS file.

Local, focused minification

This tool performs a conservative browser-side pass: it removes CSS comments when enabled, collapses whitespace outside quoted strings, and removes spacing around safe punctuation. Your stylesheet remains on this device and no server request is needed.

Readable source is still useful

Minification reduces transfer and storage size, but keep a formatted source stylesheet in your project and generate minified output as a build artifact. Custom properties, calc expressions, URLs, quoted content, and data values are preserved as text.

GOOD TO KNOW

Common questions

Does minification change my selectors or values?

The tool removes formatting characters outside strings and comments. It does not rename selectors, rewrite colors, reorder declarations, or run a CSS parser.

Should I remove all comments?

Disable comment removal when a license or attribution comment must stay in the distributed stylesheet. Ordinary comments are removed by default.

Can I use this for production builds?

It is useful for a quick local result. For production, keep your source map and run a tested CSS build pipeline that understands the syntax and browser targets of your project.