CSS Minifier / Beautifier
Compress CSS into a single compact line, or reformat it back into readable, indented code.
Paste any CSS and either minify it — stripping comments, whitespace and line breaks to shrink file size for production — or beautify it back into clean, indented, readable formatting for editing. Both directions run instantly using simple text-processing rules directly in your browser.
How to use it
- Paste your CSS into the input box.
- Click Minify to compress it, or Beautify to reformat it.
- Review the result in the box.
- Copy the result for use in your project.
Frequently asked questions
Does minifying remove comments?
Yes, all /* ... */ comments are stripped out during minification to save space.
Will beautifying fix broken CSS syntax?
No — this reformats spacing and indentation but doesn't validate or fix invalid CSS properties or selectors.
How much size reduction can I expect from minifying?
It varies by how much whitespace and commenting the original had, but 10–30% size reduction is common for typically-formatted CSS.