Format or minify CSS rules, selectors, declarations, and at-rules locally.
Loading tool
About CSS Beautify / Minify
Format messy or minified CSS with 2, 4 or 8 spaces or tabs, or minify it for production. Beautify uses js-beautify and puts a blank line between rules; minify removes comments (keeping /*! license */ blocks), collapses whitespace and drops redundant semicolons while leaving strings and url() values untouched. A lightweight brace check warns about unbalanced braces or unterminated comments.
Common uses
- Make a minified stylesheet from a CDN or production build readable for debugging.
- Normalize indentation before committing or diffing CSS.
- Shrink a small stylesheet to inline in an HTML email or a <style> tag.
- Spot a missing closing brace in a long block of CSS.
FAQ
- Does minifying CSS change how it renders?
- Removing comments and insignificant whitespace does not change how a browser applies the rules. This minifier does not merge rules, shorten colors or rewrite values, so its output stays equivalent to the input.
- Why keep /*! comments when minifying?
- By convention, comments starting with /*! mark license or copyright notices that must be retained in distributed files, so most minifiers preserve them.