Reducing JavaScript file size improves page load times and bandwidth usage. This minifier removes single-line and multi-line comments, excess whitespace, and unnecessary line breaks while preserving the functional behavior of your code.

Note: This is a lightweight minifier that handles whitespace and comment removal. For production use with variable renaming and dead code elimination, use tools like Terser or UglifyJS. Everything runs in your browser.

Minifier

Results

How to Use

  1. Paste your JavaScript into the input field
  2. Click Calculate to minify
  3. Review the minified output and size savings
  4. Copy the minified code

FAQ

Does it rename variables?

No. This is a whitespace/comment-removal minifier. Variable renaming (mangling) requires a full parser like Terser.

Will it break my code?

The minifier uses conservative rules. However, JavaScript minification without a full parser can occasionally affect edge cases with automatic semicolon insertion. Always test your minified code.

Is my code sent to a server?

No. All processing runs in your browser.

Commonly Used With

Pair this tool with others in Developer