Skip to content
Code Minifier

Code Minifier

v1.0

Strip comments and dead whitespace out of HTML, CSS, and JavaScript. Conservative on purpose: nothing is renamed or restructured, so the output behaves exactly like what you pasted in.

Runs locally — nothing leaves your browser.

Source0 B
Minified0 B
Before: 0 BAfter: 0 BAwaiting input

Only provably safe bytes are removed: comments (except /*! banners and conditional comments), redundant whitespace, and each CSS block's optional last semicolon. Contents of <pre>, <textarea>, <script> and <style> are copied through untouched, and a JavaScript line break survives wherever removing it could trigger automatic semicolon insertion. Minifying JSON? JSON Formatter minifies it, and pretty-prints it too.