Minify JavaScript

Remove comments, collapse whitespace, and reduce file size. All processing happens in your browser using the Terser engine.

100% Private Processed locally Free & unlimited

JavaScript Minifier

0 characters

Paste any JavaScript code to minify it. Comments and extra whitespace will be removed.

Ready to minify

Enter your JavaScript code above and click Minify to see compression results and savings.

0%
Savings
Compression Stats
Original Size
0 B
Minified Size
0 B
Savings
0%
Bytes Saved
0 B
Minified Output

What this tool does not do

  • Does not perform variable renaming or dead code elimination.
  • Not a full AST-based optimizer. For production builds use a bundler like Webpack or Rollup.
  • May not produce valid output for all edge cases. Always test your minified code.

How It Works

1

Paste your JS code

Enter or paste any JavaScript code into the input area.

2

Click Minify

The Terser engine processes your code to remove comments and whitespace.

3

Copy the result

Get your minified code with compression stats and savings.

Frequently Asked Questions

Is this a full AST-based JavaScript minifier?

No. This is a basic whitespace and comment removal minifier. It removes comments and extra whitespace but does not perform variable renaming, dead code elimination, or other advanced optimizations.

Does it validate my JavaScript syntax?

Yes. The tool attempts to compile your code using new Function() after minification to check for syntax errors. If errors are found, they are displayed gracefully.

Is my JS code uploaded to a server?

No. All processing happens entirely in your browser. Your code never leaves your device.

Read Guide: How to Minify JavaScript ➔