Language
English English Vietnamese (Tiếng Việt) Vietnamese (Tiếng Việt) Chinese (简体中文) Chinese (简体中文) Portuguese (Brazil) (Português do Brasil) Portuguese (Brazil) (Português do Brasil) Spanish (Español) Spanish (Español) Indonesian (Bahasa Indonesia) Indonesian (Bahasa Indonesia)
JavaScript Minifier

JavaScript Minifier

Minify JavaScript code online to reduce file size. Supports mangle, compress, drop console, and drop debugger options.

The JavaScript Minifier is a free online tool that compresses JavaScript code to reduce file size. Powered by Terser, it removes whitespace, shortens variable names, and applies optimizations to produce production-ready minified output.

  1. Paste or type your JavaScript code in the input panel on the left.
  2. Adjust options like Mangle, Compress, Drop console as needed.
  3. Click the Minify button (or press Ctrl+Enter) to minify.
  4. View the compression stats showing original vs minified size.
  5. Click Copy to copy the result, or Download to save as a file.
  • Minify JavaScript with Terser — the industry-standard ES6+ minifier.
  • Mangle option to shorten variable and function names.
  • Compress option to apply dead code elimination and optimizations.
  • Drop console and debugger statements for production builds.
  • Compression stats showing original size, minified size, and savings.
  • Upload files or paste code directly.
  • Copy minified code or download as a file.
  • 100% client-side — your code never leaves your browser.
Is my code sent to a server?
No. All minification happens locally in your browser. Your code is never uploaded or stored.
What does "Mangle" do?
Mangle shortens local variable and function names (e.g., myVariable becomes a) to reduce file size without changing functionality.
Should I enable "Drop console" for production?
Yes. Removing console.log statements reduces file size and prevents leaking debug information in production.
What minification engine is used?
This tool uses Terser, the most widely used JavaScript minifier that supports modern ES6+ syntax.
Input
Output
Error

Paste code on the left to minify automatically

Original 0 B Minified 0 B
Saved 0%
|
Paste your JavaScript code and click Minify to compress it.
Use Ctrl+Enter to minify quickly.
Enable Drop console to remove all console.log statements for production.
Want to learn more? Read documentation →
1/4
Start typing to search...
Searching...
No results found
Try searching with different keywords