JS Minifier / Beautifier

Minify or beautify JavaScript code instantly in your browser. Remove whitespace and comments. Free, no signup needed.

Preparing private browser tool…

Your file will stay on this device.

Frequently asked questions

What does JS minification remove?
It strips comments (single-line and multi-line), collapses whitespace, and removes unnecessary characters. String literals and template literals are preserved exactly as written.
Does the beautifier produce production-quality formatting?
The beautifier adds consistent indentation and line breaks for readability. For complex formatting needs like specific brace styles or semicolon preferences, a dedicated IDE formatter may be more suitable.
Is my code sent to a server?
No. Both minification and beautification run entirely in your browser using plain JavaScript. Your code never leaves your device.