JS Minifier
Minify JavaScript to reduce file size for production.
JavaScript is usually the heaviest part of a web page, and unminified code makes it worse.
About JS Minifier
Compress JavaScript source code by removing whitespace, comments, and shortening variable names, producing a smaller file for faster page loads. This JS minifier is handy for quick, dependency-free minification of scripts outside a full bundler setup.
JavaScript is usually the heaviest part of a web page, and unminified code makes it worse. The JS minifier compresses your script by removing whitespace and comments, shortening local variable names and simplifying expressions, producing a much smaller file that downloads and parses faster. It's powered by a industry-standard compressor and runs entirely in your browser.
How to use JS Minifier
- Paste your JavaScript source into the input area.
- Run the minifier.
- Review the compressed output and the size reduction.
- Copy or download the minified script.
Key features
- Whitespace and comment removal with variable-name mangling.
- Dead-code and expression simplification.
- Reports errors if the input isn't valid JavaScript.
- Local processing, so proprietary code is never uploaded.
Common use cases
- Shrinking a small script or widget snippet before embedding it on a page.
- Preparing inline JavaScript for an email or landing page.
- Checking how much a script would shrink before adding a build step.

