JavaScript Minifier
Minify JavaScript by removing comments and whitespace to shrink file size safely. See bytes saved. Runs in your browser, free.
Result
Ad space · responsive
How to use JavaScript Minifier
- Paste JavaScript.
- Minify — comments and spare whitespace are removed.
- 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.