Home › Image Tools › JavaScript Minifier
Compress JavaScript safely with Terser, including optional variable mangling — running right in your browser with no build tooling.
Crop images visually with aspect-ratio presets and drag handles — export as PNG, JPG, or WebP, all offline.
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.
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.
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
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.
- Terser-powered — the same minifier trusted by major build tools, no setup required.
- Two levels — Standard for safe whitespace removal, Aggressive for compression plus mangling.
- Clear error reporting — syntax problems are surfaced with a readable message.
- Offline fallback — a built-in basic minifier keeps working if the library can't load.
- Batch and savings — minify up to 15 files and see exact bytes saved.
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.