JavaScript Minifier
A lighter JavaScript file with comments and whitespace taken out.
…
How to do it
- 1Add the text
Paste or type the text or amount here.
- 2See the result
The result appears right away as you type.
- 3Copy it
Copy the result and use it anywhere. Your text goes nowhere.
About this tool
Paste your JavaScript and the tool removes comments and unnecessary whitespace while keeping strings, template text and regular expressions safe. This is a light minifier: it does not rename variables. For the smallest possible file use a build tool, but this is quick for small scripts and snippets.
Frequently asked questions
Does it rename my variables?
No. It only removes comments and extra whitespace, so the code stays readable to debug.
Is my code uploaded?
No. Everything runs in your browser.