CSS / JS / HTML Minifier
Minify or beautify CSS, JavaScript, and HTML in your browser — no server, no external libraries. View compression ratio and byte savings instantly.
Input
Output
Output will appear hereClick "Minify CSS" to process your code
How It Works
CSS Minifier
Removes comments, strips redundant whitespace, eliminates trailing semicolons, and collapses spaces around selectors and properties — all with pure regex.
JS Minifier
Strips single-line and block comments, collapses whitespace, and removes spaces around operators. Conservative approach — safe for most JS without AST parsing.
HTML Minifier
Strips HTML comments, collapses whitespace between tags, and normalises attribute spacing — keeping your markup valid and functional.