JS Minifier
Shrink JavaScript by stripping comments and extra whitespace.
About this tool
It strips // and /* */ comments and removes every space and line break that isn’t needed, using a tokenizer that knows when it’s inside a string, a template literal (including nested ${…} expressions), a regular expression or a comment, so it never corrupts a URL like "http://example.com" sitting inside a string or confuses division with a regex.
Line breaks are kept wherever JavaScript’s automatic semicolon insertion depends on them, so code written without semicolons still works after minifying, and a return followed by a value on the next line keeps its (surprising but correct) meaning. Licence comments that start /*! are kept by default. It doesn’t rename variables or remove unused code the way Terser or esbuild do, so for production bundles use a build tool; for a snippet, a bookmarklet or a quick size check, it’s safe and fast.