← All tools

DEVELOPER TOOL

JavaScript Minifier

Remove ordinary comments and redundant whitespace from JavaScript locally.

Your minified JavaScript will appear here.

Minification runs locally in your browser. Ordinary comments are removed, license comments and literals are preserved, and original line breaks are kept to help protect automatic semicolon insertion. This is not a full JavaScript parser or validator.

This lightweight minifier is not a full JavaScript parser or validator. It does not rename variables or perform advanced optimizations; review the output and test your code before using it.

JavaScript is minified locally in your browser and is not uploaded.

How to use JavaScript Minifier

  1. Paste JavaScript into the input panel.
  2. Select Minify JavaScript to create a compact version.
  3. Copy the result or edit the input to start again.

Does the minifier remove all comments?

Ordinary comments are removed. Comments beginning with /*! or //! are retained as potentially important notices.

Why are some line breaks retained?

Line breaks are preserved to reduce the risk of changing JavaScript automatic semicolon insertion behavior.

Is my JavaScript uploaded?

No. Minification runs locally in your browser.