JS Minifier

Minify JavaScript by removing whitespace and comments. — free, fast and private.

How to use JS Minifier

  1. Paste your JavaScript code into the box.
  2. Click Minify.
  3. Check the size saved, then copy the minified code or download it.

Note: this tool runs in your browser. Nothing is uploaded.

Frequently Asked Questions

What does the JS Minifier do?

It removes JavaScript comments and collapses unnecessary whitespace, shrinking the file for faster loading. Note: it is a simple whitespace minifier — it does not rename variables, and // inside a string literal can be affected, so test the result before deploying.

Will minifying break my code?

For normal code it is safe: only comments and unnecessary whitespace are removed. Always keep an unminified backup and test the minified version before deploying.

Is my data uploaded to a server?

No. This tool runs entirely in your browser and your input is never uploaded to a server.

Can I use this tool on my phone?

Yes, the tool is fully mobile-friendly and works in any modern browser.