Home/Web Tools/CSS minifier and prettier

CSS minifier and prettier

CSS Minifier and Prettier

Minify stylesheets with a fast minifier or prettify them with Prettier for readable output.

0 -> 0 bytes Ready
InputPaste CSS here
OutputLive format with a short delay
Prettify or minify in one view Clean output ready to copy Fits desktop and mobile

How it works

Choose Prettify to format CSS with Prettier or Minify to compress it with a CSS minifier. The tool keeps selectors and rules intact while reshaping whitespace and punctuation.

  • Prettify expands rules with consistent spacing and line breaks.
  • Minify can merge or remove redundant declarations, so review critical overrides.

Quick examples

Prettify
.card{color:#fff;padding:12px 16px}
.card { color: #fff; padding: 12px 16px; }
Minify
.card { color: #fff; padding: 12px 16px; }
.card{color:#fff;padding:12px 16px}

Minify reduces payload size while Prettify helps with edits and reviews.

Mini FAQ

Does minify change behavior?

It removes whitespace and may merge duplicate rules. If rule order matters, review the output.

Why is my CSS failing to format?

Prettier needs valid CSS. Fix missing braces or invalid selectors and try again.

Can I use SCSS or LESS?

This tool targets plain CSS only. Preprocessors may fail to parse.