Skip to content

All tools

CSS Minifier

Shrink CSS by removing comments and extra spaces.

  • 100% free
  • Runs in your browser
0 characters

Last reviewed by the OnlineToolPro team

What is the CSS Minifier?

Minifying removes comments, line breaks and spaces the browser doesn't need, so your stylesheet downloads faster. The CSS behaves exactly the same.

How it works

How to use the CSS Minifier

3 simple steps. No experience needed.

What can you use it for?

  • Shrink a stylesheet before putting it live.
  • Minify CSS for an HTML email or embed.
  • Check how much space comments take up.

What gets removed

Comments, line breaks, indentation and spaces around symbols like { } : ; are removed, as is the last semicolon in each block. Values, selectors and the order of rules stay exactly the same.

Do you still need it?

Most build tools minify CSS automatically. This is handy for hand-written stylesheets, snippets pasted into a CMS, and quick checks of how much space minifying would save.

FAQ

Frequently asked questions

Can minifying break my CSS?

It only removes characters the browser ignores, and keeps spaces where CSS needs them (such as inside calc).

Can I un-minify CSS?

Minifying removes formatting permanently, so keep your original file. Comments can't be recovered.

Other tools you might find useful next.

More CSS Tools

Generate and tidy up CSS with live previews. 4 free tools.

Browse CSS tools
Other categories:YouTubeTextImagesPDFs