CSS Minifier and Beautifier

Compress CSS to make it smaller, or turn minified CSS back into readable code.

FreeNo sign-upPrivate — runs in your browser
0 BInput size
0 BResult size
—Change
0Result lines

How to use the CSS Minifier and Beautifier

  1. Paste your CSSPaste a stylesheet or open a .css file.
  2. Choose Beautify or MinifyBeautify formats each rule and property on its own line. Minify removes comments, spaces and line breaks.
  3. Copy the resultSee how much smaller the file got, then copy or download it.

Example

.card , .panel > h2 { padding : 16px 24px; } minifies to .card,.panel>h2{padding:16px 24px}

Spaces inside calc(100% - 2rem) are kept, because calc needs them, and /*! license */ comments are preserved.

Frequently asked questions

What does a CSS minifier remove?

Comments, line breaks, indentation, spaces around symbols like { } : ; , and the last semicolon in each rule. The styles work exactly the same.

Which comments are kept?

Comments that start with /*! are kept, because they usually hold license notices. All other comments are removed.

Can I un-minify CSS?

Yes. Paste minified CSS and choose Beautify to get readable code back. Removed comments cannot be restored.

Is my CSS uploaded?

No. It is processed entirely in your browser.

Popular posts from this blog

Character Counter

Speech to Text Online

Keyboard Tester