CSS Minifier

Minify or format CSS instantly in your browser. Shows byte savings and detects vendor prefixes. No data uploaded — runs 100% locally.

Did we solve your problem today?

What is a CSS Minifier?

A CSS Minifier removes unnecessary characters from CSS code — comments, whitespace, and redundant semicolons — without changing how the styles work. Smaller CSS files load faster and use less bandwidth. This tool minifies and formats CSS entirely in your browser; your code is never sent to any server.

How to Use

  1. Paste your CSS into the input box on the left
  2. Click Minify to compress, or Format to beautify
  3. Click Copy to copy the output to your clipboard

The validator runs automatically as you type — a green indicator means your CSS structure is valid, red means there are unclosed or mismatched braces.

Minify vs. Format

ModeWhat it doesWhen to use
MinifyRemoves comments and whitespace, strips redundant semicolonsProduction builds, reducing payload size
FormatAdds consistent 2-space indentation, one property per lineReading, editing, code review

What the Minifier Removes

Vendor Prefix Detection

The tool detects vendor-prefixed properties in your CSS (-webkit-, -moz-, -ms-, -o-) and lists them below the output. Vendor prefixes were used before browser support was finalised — modern CSS often no longer needs them.

Byte Savings

After minification, the tool shows how many bytes were saved and the percentage reduction. This is the uncompressed saving — gzip or Brotli compression typically reduces CSS by a further 60–80% on top.

CSS Validation

The tool checks for basic structural errors:

Quoted strings and comments are excluded from the brace check so curly braces inside them do not count.

Privacy

All processing runs locally in your browser using JavaScript. No CSS is ever uploaded, stored or logged. You can use this tool offline once the page has loaded.

FAQ

Is my CSS uploaded to a server?

No. All minification and formatting runs locally in your browser using JavaScript. Your CSS never leaves your device.

What does the CSS minifier remove?

It removes block comments, collapses whitespace, strips spaces around colons, semicolons and braces, and removes trailing semicolons before closing braces.

What does the CSS formatter do?

It parses the CSS and re-outputs it with consistent 2-space indentation: one property per line, the opening brace on the selector line, and the closing brace on its own line.

What are vendor prefixes?

Vendor prefixes (-webkit-, -moz-, -ms-, -o-) are browser-specific extensions used before a property was standardised. The tool detects which ones are present in your CSS.

What does byte savings mean?

It shows how much smaller the minified CSS is compared to the original — useful for estimating the impact on page load time. Real savings are even larger with gzip or Brotli compression on top.