CSS Minifier & Beautifier
Strip a stylesheet down to its smallest form, or reformat minified CSS back into something readable.
Last updated
How to minify or beautify CSS
- Paste your CSS.
- Click Minify to make it as small as possible, or Beautify to make minified CSS readable.
- Click Copy result.
About this tool
Minify strips comments, collapses whitespace, and removes redundant characters (trailing semicolons, extra spaces around braces/colons) without changing what the CSS does. Beautify reverses the process — it re-indents rules by nesting depth and puts each declaration on its own line, useful for reading minified CSS pulled from a live site or a build output.
Both work on a text level using pattern matching, not a full CSS parser, so exotic constructs (CSS inside comments-like string content, unusual nesting) are the main edge cases to double-check. Nothing you paste here is uploaded — everything runs as JavaScript in your browser tab.
Questions about minifying CSS
What does minifying CSS do?
Removes comments, spaces, line breaks and unneeded semicolons without changing how the CSS works, so it downloads faster.
How much smaller will it be?
Usually 15–30%, depending on how many comments and how much spacing there is. Gzip or Brotli on the server shrinks it much further.
Can I read minified CSS from a website?
Yes. Paste it and click Beautify to put each rule and declaration on its own indented line.
Is it safe for all CSS?
For normal stylesheets, yes. It works on the text rather than fully parsing CSS, so check unusual code, such as content strings containing braces.