JS Minifier
NewDeveloperPaste a JavaScript file and this tool strips leading whitespace, empty lines and whole-line comments to shrink the size without touching string literals or template strings. Handy for a quick size cut before pasting code into chat messages or email. Processing is done locally in your browser.
Paste JavaScript code above to clean it up.
Removes blank lines, leading indentation and whole-line comments. String literals and template strings are left untouched.
How does the minifier work?
It trims the indentation at the start of every line, deletes blank lines and removes lines that are only comments. Because it never touches the inside of strings or template literals, the meaning of your code is preserved exactly.
Is this the same as a full minifier?
No. A full minifier rewrites variables and strips every unnecessary byte. This tool is the safe, readable middle ground: it shrinks code noticeably for casual use without ever risking a syntax break.
Frequently Asked Questions
What is JS Minifier?
Remove blank lines, indentation and whole-line comments from JavaScript.
How do I use JS Minifier?
Type or paste your data into the field on this page and press the button. The result is calculated instantly in your browser — nothing is uploaded.
Is JS Minifier free?
Yes, JS Minifier is completely free. No signup, no downloads and no usage limits.
Similar tools
View all toolsPopular tools
View all toolsWant to share what you created? Try linklyhub.com for a short, clean link.