100% Client-Side • Powered by Terser AST Parser • Zero Cloud Upload
Free JavaScript (JS) Minifier & Optimizer
Minify, compress, and beautify JavaScript code in your browser. Eliminates whitespace, dead code, and comments while safely preserving strings, regex, and modern ES6+ syntax.
Terser AST Parser
ES6+ & Async/Await Ready
Beautify / Formatter
Ctrl + Enter Shortcut
Original JS Size
0 B
0 lines
Minified Output
0 B
0 lines
Bandwidth Savings
0 B
0% reduction
Terser AST Time
0 ms
100% In-Browser
What is JavaScript Minification and why is it important?
JavaScript minification is the process of removing all unnecessary characters from code—such as whitespace, newlines, comments, and dead code—without altering its functionality. It significantly shrinks file sizes, speeds up page load times, reduces bandwidth consumption, and improves Google Core Web Vitals (such as INP and FCP).
How does Terser minify code differently than simple text tools?
Terser is the industry-standard JavaScript minifier used by webpack, Vite, and Rollup. It converts code into an Abstract Syntax Tree (AST), ensuring that variables, regular expressions, strings, and template literals are analyzed mathematically. Simple regex tools often break code by removing spaces inside quotes or corrupting complex logic.
What does "Mangle Variable Names" mean and is it safe?
Mangling shortens local variable and parameter names to single letters (such as calculateTotal to a) to save maximum bytes. While safe for internal functions, mangling top-level variables can break code if external scripts or HTML inline handlers call those functions by name. For this reason, mangling is disabled by default in our tool.
Is my JavaScript code uploaded to your servers or executed?
No! All processing is executed 100% locally in your web browser using our bundled client-side Terser engine. Your code is never executed, never evaluated, and never sent across the internet to any server. Your proprietary logic remains completely private.
Does this tool support modern ES6+, async/await, and classes?
Yes! Our Terser integration supports modern ECMAScript standards (ES2022+), including arrow functions, async/await, classes, optional chaining (?.), nullish coalescing (??), and object spread syntax.