JavaScript Minifier
Remove JavaScript formatting and ordinary comments without executing the code or renaming variables.
How to use it
- Paste JavaScript or open a UTF-8 file. Load the example to try it.
- Select Minify JavaScript.
- Review the output. If an error appears, correct your input and try again.
- Copy the result or download javascript-minifier.js.
Compact syntax, no optimizer assumptions
Terser prints compact JavaScript with compression and name mangling disabled. License and preservation comments are retained. Choose ES module for import, export, or top-level await. JSX and TypeScript must be compiled before minifying. This does not bundle modules or transpile code; source-map comments are removed and no replacement map is generated.
Only the required local processor is loaded when you run the tool. Large jobs run in a cancellable background worker. Source and results remain text, including scripts, markup, and URLs.