What it does
Minifies CSS or JavaScript code by stripping comments, unnecessary whitespace, and line breaks — or beautifies already-minified code by re-indenting it, adding line breaks after key characters ({, }, ;) so it's readable again.
Try it
How it works
- Minify: strips
/ ... /(CSS) and//// ... /(JS) comments, collapses all whitespace/newlines to single spaces, and removes spaces around punctuation like{,},;,:,,where safe to do so. - Beautify: inserts a newline and re-indents after every
{,}, and;, tracking nesting depth to produce readable, consistently indented output.
⚠️ This is a lightweight, regex-based tool for everyday convenience — it covers the vast majority of real-world CSS/JS, but it's not a full parser, so extremely unusual syntax (e.g. strings containing unescaped braces) may not round-trip perfectly. Always keep a backup of your original file.
Everything runs locally in your browser — nothing is uploaded anywhere.