CSS Formatter & Minifier

Turn minified CSS back into readable rules, or compress your stylesheet and see how many bytes you save.

✓ Runs locally in your browser — nothing is uploaded

In short: A CSS formatter puts each selector and declaration on its own indented line; a CSS minifier removes comments and whitespace so the stylesheet downloads faster.

About CSS Formatter & Minifier

Reading a minified stylesheet to find out why a button is the wrong color is miserable. Beautifying puts every selector on its own line with one declaration per line, so overrides, media queries and specificity problems become visible.

Minifying goes the other way: it strips comments (except /*! … */ license comments), whitespace, the last semicolon in each block and other redundant characters, while leaving the contents of strings and url() values alone. It does not merge or reorder rules, so the cascade is unchanged.

How to use CSS Formatter & Minifier

  1. Paste CSS into the input.
  2. Press Beautify for readable output or Minify for the smallest version.
  3. Check the size message and copy the result.

Examples

Beautify

a{color:red;margin:0} becomes a three-line rule with each declaration indented.

Minify

A rule with comments and indentation, such as /* buttons */ .btn { color: #fff; }, becomes .btn{color:#fff}.

Frequently asked questions

Is the minified CSS safe to use?

Yes. It only removes characters that have no effect: comments, whitespace and redundant semicolons. Strings, calc() expressions and selectors keep the spaces they need.

Does it support SCSS or Less?

Beautify works on most SCSS and Less because their syntax is CSS-like. Minify is designed for plain CSS; compile preprocessors first.

Why are some comments kept?

Comments starting with /*! conventionally hold license notices, so they are preserved.

Is my stylesheet uploaded?

No. Processing happens in your browser. You can check this yourself: open your browser’s developer tools, switch to the Network tab and use the tool — no request carries your input.

Updated November 2026 · Free, no signup · How we build and test tools

Related tools All developer tools →