JS Minifier
Paste or upload your JavaScript and shrink it for production — shorten variable names, strip comments and console logs, no upload required, all in your browser.
About this tool
The JS Minifier shortens variable names, strips comments and optionally removes console.log statements to make your JavaScript as small as possible without changing what it does. Paste your code directly or upload a .js file, choose how aggressive the minification should be, then copy the result or download it as a ready-to-use file. Everything runs locally in your browser — your code is never sent anywhere.
How it works
-
1
Paste or upload your JavaScript
Drop in a .js file, or paste the code straight into the box.
-
2
Choose your options
Decide whether to shorten variable names, strip comments, and remove console.log calls.
-
3
JS gets minified
Your code is compressed right in your browser, and you see exactly how much was saved.
-
4
Copy or download
Copy the minified code, or download it as a ready-to-use file.
FREQUENTLY ASKED QUESTIONS
No. The logic stays exactly the same — only variable names, comments and (optionally) console.log calls are affected, never the actual behavior of your code.
No. Everything runs locally in your browser — your code is never sent to a server.
It renames local variables and function-scoped names to shorter ones without changing what your code does. It's safe for typical code; only skip it if something in your script relies on the exact original names, e.g. via reflection.
It's optional. Removing them is a good idea for a production build so no debug output leaks to users — but keep them if you still want that logging in the deployed version.
Need more than a free tool?
If you're ready for a real project — website, branding, or something custom — let's talk.