JavaScript Minifier — Free Online Tool
Shrink your JavaScript instantly — remove comments and whitespace, compress syntax and mangle variable names. Faster loads, smaller files.
How it works
Frequently asked questions
How does the minification work?
This tool uses Terser — the industry-standard JavaScript minifier — loaded in your browser. It removes comments and whitespace, compresses syntax and shortens variable names, so your file stays functionally identical but much smaller.
What does "simple minifier (no Terser)" mean?
If the Terser library cannot be loaded (for example you are offline or the CDN is blocked), the page automatically falls back to a built-in simple minifier and says so honestly. The simple minifier only strips comments and collapses whitespace — it does not compress syntax or mangle variable names, so the savings are smaller. Reconnect and reload the page for full Terser minification.
Is my code uploaded to a server?
No. Everything runs locally in your browser — the minification engine itself is a JavaScript library executed on this page, so your code never leaves your device.
Terser-powered minification · ES6+ safe · 100% local — your code never leaves this page.