CSS Minifier and Beautifier

Shrink or Tidy Stylesheets.

Loading…

A stylesheet written for people has comments, spaces and line breaks the browser does not need. Minifying removes them and shortens values such as 0px to 0 and #ffffff to #fff.

Beautify does the reverse for a stylesheet that arrived as one long line. The byte count before and after shows what was saved.

How to use the CSS Minifier and Beautifier tool

  1. Paste the CSS or open a file.
  2. Choose Minify or Beautify and whether to keep comments.
  3. Copy the stylesheet or download it.
  • Faster-loading stylesheets for a website
  • Reading and debugging a minified theme
  • Inline critical CSS in a page head

Tips for the best result

  • Keep comments ticked if the file starts with a license notice you must retain.
  • Edit the readable file and minify as the last step before upload.

Quick facts

PriceFree
Works withCSS
Where it runsIn your browser, on your device
AccountNot needed

Frequently asked questions

Will minified CSS behave differently?

No. Only characters without meaning are removed, and equivalent shorter values are used.

Does it handle media queries and variables?

Yes. Modern CSS including custom properties, grid and nesting passes through.

Does it remove unused rules?

No. It shrinks what is there; finding unused CSS needs the pages that use it.

What does beautify change?

Only layout: one declaration per line, consistent indentation.