Home โ€บ Developer Tools โ€บ CSS Minifier

โœ‚๏ธ CSS Minifier

Minify CSS to a single tight line, or beautify it back โ€” with byte savings shown.

About this CSS Minifier

Smaller CSS files download faster and make pages feel instant. This minifier strips comments, collapses whitespace and removes the spaces around punctuation to squeeze a stylesheet onto one tight line, then reports exactly how many bytes you saved. Its beautifier does the reverse, expanding minified CSS into an indented, readable layout.

How to use it

  1. Paste your CSS into the Input box.
  2. Click Minify to compress it, or Beautify to expand it readably.
  3. Check the byte count and percentage saved.
  4. Copy the output and use it in your project.

Example

The rule body { color: red; } minifies to body{color:red} โ€” same styling, a quarter of the size.

Frequently asked questions

Will minifying change how my site looks?

No. Minification only removes comments and whitespace that browsers ignore. Selectors, properties and values are untouched.

Should I keep an unminified copy?

Yes. Always keep your readable source file for editing, and use the minified version only on the live site.

How much can I expect to save?

Typically 15โ€“30% on hand-written CSS. The exact byte counts before and after are shown under the output.

More Developer Tools