JavaScript Minifier
Shrink JavaScript for production by removing everything the browser does not need.
Remove comments and whitespace, shorten names, and simplify code so pages load faster. Modern JavaScript syntax is supported.
Features
Use Cases: When This Tool Helps
-
Speed up websites
Shrink scripts so pages load faster, especially on mobile data.
-
Optimize small sites without a build tool
Minify a plain script.js for a landing page without setting up Webpack or Vite.
-
Prepare embeddable widgets
Deliver compact scripts for partners to paste into their sites.
-
Improve PageSpeed scores
Fix "minify JavaScript" warnings from Lighthouse and PageSpeed Insights.
-
Remove debug output before launch
Strip console.log calls from production code.
-
Fit code into size limits
Reduce bookmarklets, tag manager snippets, or browser extension files.
How to Use
- Paste your JavaScript.
- Choose the options you want.
- Press Minify and copy the result.
FAQ
Will minified code behave the same?▾
It should. Test before deploying, especially if your code relies on function or variable names.
Is my code uploaded?▾
No. The minifier library downloads to your browser and your code stays there.