Add to Chrome Add to Edge

JS Minifier

Compress JavaScript by removing comments, whitespace and other unneeded characters.


JS Minifier

Smaller scripts download and parse faster. This tool compresses your JavaScript by removing comments, whitespace and other unneeded characters.

How to use JS Minifier

  1. Paste your JavaScript into Enter your JS Code Here.
  2. Click Minify Code.
  3. Copy the result. If you see an error, check that the syntax is valid.

When it comes in handy

  • Reducing the size of small scripts and bookmarklets.
  • Preparing snippets for inline use in landing pages.
  • Comparing sizes before and after minification.

Frequently asked questions

Why do I get a syntax error?
The minifier needs valid JavaScript. A missing bracket or an unfinished statement will stop it, so run the code through a linter first.
Does minifying hide my code?
It makes it harder to read but not secure. Anyone can reformat minified code, so do not put secrets in front-end scripts.

Related guides

Choose which cookies SEOpeck may use. You can change this at any time from "Cookie settings" at the bottom of every page.

Your tools

    Saved in this browser only. Nothing is sent to us.

    Popular tools