Minify JavaScript by stripping comments and collapsing whitespace. Reduce script size for faster delivery — best for simple scripts, not full bundler output.
Output will appear here.
Frequently Asked Questions
What does the JavaScript Minifier do?
It removes comments and extra whitespace to shrink file size — all processing runs in your browser.
Is this a full compiler?
No. It performs safe whitespace and comment processing. Complex syntax may need a dedicated build tool.
Will my code break?
Minification removes comments and spaces only. Always test output in your project before production use.
Need to beautify instead?
Use the CSS or JavaScript Beautifier on draft21.
Is this tool free and does it work on mobile?
Yes on both counts. The JavaScript Minifier on draft21 is completely free with no sign-up required and works on all devices.