Output appears here...Minify or combine several JavaScript files
Add several files, put them in order, then process them all with the options above. Files stay in your browser.
How to use
Paste or upload JavaScript
Put code in the Input pane or click Upload .js. Try sample loads a small function with a license comment, a debugger statement and console.log calls, so you can see what each option does.
Choose options and click Minify
Tick the options you need, pick Output syntax and Compress passes, and click Minify, or turn on Live mode. A syntax error shows its line and column instead of an empty result.
Copy or download
Click Copy, or Download to save the .min.js file, and Download .map when a source map was made. For several files, use the batch panel to download a ZIP or one combined bundle.min.js.
Why JavaScript Minifier
- Terser 5 with options for mangling, console and debugger removal, names, modules and output syntax.
- Source map download for debugging production errors.
- Minify or combine several files into a ZIP or one bundle.
- Shows bytes saved and a gzip estimate, all in your browser.
Terser, esbuild, UglifyJS and obfuscators compared
All of these make JavaScript harder for people to read, but they have different goals. Minifiers aim for the smallest file that still behaves the same. Obfuscators aim to hide how the code works, usually at the cost of size and speed.
This page uses Terser because it runs well in the browser and gives small output. In a project you will usually meet it, or esbuild, inside your bundler rather than on its own.
| Tool | What it does | Where you meet it |
|---|---|---|
| Terser | Compresses code and shortens names; forked from uglify-es | webpack's default minifier for production builds, and this page |
| esbuild | Very fast bundler and minifier written in Go | Vite's default JavaScript minifier |
| UglifyJS | The older minifier that gave uglify its meaning | Older build setups |
| Obfuscator | Renames, encodes strings and adds confusing control flow | Code where hiding logic matters more than size |