← Back to Converters

JS Minifier

Minify JavaScript and show byte savings

About the JS Minifier

The JS Minifier compresses JavaScript by removing whitespace and, optionally, comments, showing exactly how many bytes you save. Shipping smaller JavaScript files means faster page loads and less bandwidth used by every visitor.

How to Minify JavaScript

  1. Paste your JavaScript into the input box.
  2. Choose whether to remove comments.
  3. Click Minify JS.
  4. Copy the minified output and check the byte savings.

Key Features

  • Removes unnecessary whitespace
  • Optional comment stripping
  • Shows before/after size and savings
  • Fast, browser-based processing

FAQ

Will minifying break my JavaScript?

No, only whitespace and, optionally, comments are removed — the code's logic stays the same.

How much can I reduce file size?

Savings depend on your original formatting and comments — the stats panel shows the exact result.

Can I keep the comments in?

Yes, uncheck Remove comments before minifying.

Is my code uploaded anywhere?

No, minification happens entirely in your browser.