Home  ›  Image Tools  ›  JavaScript Minifier

JavaScript Minifier

Compress JavaScript safely with Terser, including optional variable mangling — running right in your browser with no build tooling.

✓ Free✓ No signup✓ Privacy first✓ Runs in your browser

Crop images visually with aspect-ratio presets and drag handles — export as PNG, JPG, or WebP, all offline.

Drag & drop an image here or click to browseOne image • PNG, JPG, WebP, GIF • up to 50 MB
How it works
Convert in three steps

Paste or drop

Paste your JavaScript or drop up to 15 .js files. Choose Standard or Aggressive (mangle).

Minify

Click Minify. Terser compresses your code, reports any syntax errors clearly, and shows how many bytes you saved.

Copy or download

Copy the minified output or download it as a .min.js file. Everything stays on your device.

FAQ
Common questions

It uses Terser — the industry-standard minifier — loaded in your browser. Standard mode strips comments and whitespace; Aggressive mode also compresses and mangles local variable names.

Terser only renames variables it can prove are safe to rename, so behaviour is preserved. As with any minifier, test the output before deploying to production.

If Terser can’t load, the tool falls back to a built-in basic minifier that safely removes comments and whitespace (without renaming), and tells you so. Reconnect for full mangling.

No. Your JavaScript is never uploaded. Minification runs locally; only the Terser library file is fetched from a CDN.

Keep going
Related tools

CSS Minifier

Reduce CSS Size Without Losing Quality

HTML Formatter / Beautifier

Beautify HTML For Better Readability Online

JSON Formatter

Format, Validate, And Beautify JSON Effortlessly

Base64 Encoder / Decoder

Encode Or Decode Base64 Strings Easily

About the JavaScript Minifier

Minifying JavaScript reduces file size and speeds up page loads by removing comments, whitespace, and — in aggressive mode — shortening local variable names. This tool runs Terser, the same engine used in modern build pipelines, directly in your browser, so you get production-grade compression without installing Node or configuring a bundler. Invalid syntax is reported with a clear message, and a graceful fallback keeps the tool useful even without a connection.

Benefits
Privacy

Your source code is processed entirely in your browser and is never uploaded. The only network request is to fetch the Terser library from a public CDN — your JavaScript itself stays local at all times.