JavaScript Minifier & Beautifier

Compress JS for production using Terser, or beautify minified code for inspection.

About this tool

How JavaScript Minification Works

This tool uses Terser, the standard minifier for ES2015+ JavaScript (the successor to UglifyJS). Minification removes whitespace and comments, shortens variable names ("mangling"), inlines small functions, and removes dead code. A typical reduction is 30–60% of the original size.

Should I drop console.log statements?

Yes for production — they leak debugging info and slow down hot paths slightly. Keep them disabled in dev builds.

Related Tools

More Dev Tools

Base64 EncoderBcrypt GeneratorColor PickerCron ParserCSS MinifierCSV ⇄ JSON

Want more detail? Read How to Use JavaScript Minifier: Practical Guide and Best Practices.