Dev tools
JS Minifier
Minify JavaScript with optional variable mangling.
JS Minifier
body{color:red;margin:0;}Reduction
24%
About the JS Minifier
The JS Minifier reduces the size of JavaScript by removing whitespace and comments, with optional variable mangling for an even smaller result. Smaller scripts download faster and begin parsing sooner, which feeds directly into better page-load performance and a snappier first interaction for your visitors.
Developers use it to prepare a script for production or to slim down a self-contained snippet for embedding, in cases where reaching for a heavyweight bundler would be overkill. Toggling the mangling option lets you trade a little readability for the smallest possible output when every kilobyte counts.
Minification happens in your browser, so your code is never uploaded to a server. There is no install and no sign-up, which makes it a fast, frictionless way to produce a production-ready file on demand whenever you need one. Processing the code in the browser also means proprietary scripts are never uploaded, so you can safely minify work that has not yet been published.
Frequently asked questions
How much does JS minification reduce file size?
It removes whitespace and comments, and optional variable mangling shrinks names further — typical savings range from about 30% to 60% depending on the code.
Does it support modern JavaScript (ES6+)?
Yes. It is powered by Terser, which understands modern ES6+ syntax.
Is the minified code still functionally identical?
Yes. Minification only removes characters that are not needed for execution, so behaviour is unchanged.
Is my code sent to a server?
No. Minification runs entirely in your browser, so your code never leaves your device.