Home » Developer Tools » JavaScript Minifier
Paste JavaScript and get a smaller, faster loading version in seconds, right in your browser.
Your code never leaves your browser. Everything runs locally on your device.
Large JavaScript files slow down your pages, especially on mobile connections. The JavaScript Minifier removes comments and extra whitespace and shortens variable names, so your code stays working exactly as before but downloads much faster.
Everything runs in your browser, so your code is never uploaded to a server. Paste your script, minify it, and copy the result straight into your project.
Yes, it is completely free with no sign up and no limits. You can minify as much JavaScript as you like, as often as you like.
Yes. Minifying only removes comments and extra whitespace and shortens local variable names. Your code keeps the same logic and behavior.
No. Text inside strings, template literals, and regular expressions is left untouched, even when it looks like a comment or a division sign.
Keep it on for the smallest file size. Turn it off only if you need readable variable names in the output, for example while debugging.
No. All minifying happens in your browser on your own device, so your code never leaves your computer.
The tool shows a clear error message and keeps your input untouched, so you can fix the error and try again.
If you want to test or edit your code before shrinking it, try the online code editor to write and preview it first.