CSS Formatter & Minifier
Make a stylesheet readable again, or shrink it for production.
Runs in your browser · No uploads
Your browser is too old to run this tool. Please update it, or use a current version of Chrome, Edge, Firefox or Safari.
- Nothing leaves your device
- No server-imposed size limits
- No sign-up, no watermark
- Free
How to format or minify CSS
- Paste your CSS or open a .css file.
- Choose readable (beautify) or small (minify).
- Copy or download the result.
Safe minifying
- Comments are removed, except those starting with /*! (usually licenses).
- Text in quotes is never changed, and spaces that matter, such as around + and - in calc() or before ":hover" in "a :hover", are kept.
- The last semicolon before } and spaces around { } ; , and > are dropped.
Beautifying
Readable CSS is produced by js-beautify, a widely used open-source formatter: one declaration per line, consistent indentation and a blank line between rules.
Frequently asked questions
How much smaller does minified CSS get?
Typically 15 to 30% before compression. Your server's gzip or Brotli compression saves much more on top.
Is my CSS uploaded?
No. Everything happens in your browser, and the page is blocked from uploading anything.
Related tools
-
Format HTML
Tidy up HTML with consistent indentation and line breaks. -
Format JavaScript
Beautify minified or messy JavaScript with consistent indentation. -
Make a CSS gradient
Design linear, radial and conic gradients and copy the CSS. -
Make a CSS box shadow
Design layered box shadows with a live preview and copy the CSS.