JavaScript Minifier

Minify JavaScript by removing comments and whitespace to shrink file size safely. See bytes saved. Runs in your browser, free.

Result

How to use JavaScript Minifier

  1. Paste JavaScript.
  2. Minify — comments and spare whitespace are removed.
  3. Copy or download the result.

Privacy

Runs entirely in your browser. Nothing you enter or open here is uploaded.

Questions

Does it rename variables?

No. It's a safe whitespace-and-comment minifier, so behaviour can't change. For the smallest builds, use a bundler such as esbuild or Terser in your project.

Why are some line breaks left?

Where a line break may end a statement (code without semicolons), it's kept so the code still runs the same.

Related tools