Minify and beautify JavaScript with Terser. Free, private, runs in your browser.
100% private — your files never leave your browser. All processing happens locally on your device.
JavaScript minification reduces file size by removing whitespace, comments, and newlines, shortening variable names (mangling), and eliminating dead code. A typical JavaScript file can be reduced by 40-70% through minification. This is a critical step in web performance optimization — smaller JavaScript files download faster, parse quicker, and reduce time-to-interactive for your users.
Every kilobyte of JavaScript that a browser downloads must be parsed and executed before a page becomes interactive. Google's Core Web Vitals explicitly measure JavaScript's impact on page load performance. Minification is one of the simplest and most effective optimizations: it requires no code changes, produces identical behavior, and can save hundreds of kilobytes on larger applications. It's standard practice for all production web deployments.
The tool uses Terser, the industry-standard JavaScript minifier used by webpack, Vite, Rollup, and most modern build tools. Terser fully supports ES2015+ syntax including arrow functions, destructuring, async/await, optional chaining, and nullish coalescing. Options include compression (dead code elimination, constant folding), mangling (variable name shortening), and a Beautify mode that reverses minification into readable formatted code.
Yes. Your JavaScript code is processed entirely in your browser. Nothing is uploaded to any server. This makes it safe for proprietary code, internal libraries, and any source code you want to keep confidential.
Typically 40-70% size reduction. The exact amount depends on the code structure, variable name lengths, and whether compression and mangling are enabled.
Yes. The tool uses Terser, which fully supports modern JavaScript including arrow functions, destructuring, async/await, optional chaining, and all ES2015+ features.
Yes. Switch to Beautify mode to format minified or compressed JavaScript into clean, readable code with proper indentation.
Terser is battle-tested and used by webpack, Vite, and most JavaScript bundlers. If your code runs correctly before minification, it will run correctly after.