About this tool
A safe minifier for scripts and snippets: it strips comments and whitespace but never renames variables or changes code, so the result behaves exactly like the original. Line breaks that JavaScript needs for automatic semicolons are kept.
How to use it
- Paste your JavaScript or open a .js file.
- Leave 'Keep licence comments' on if the code includes a licence header.
- Copy the minified code or download it as script.min.js.
Questions
Will minified code still work?
Yes. Only comments and unneeded whitespace are removed. Strings, template literals and regular expressions are copied exactly, and line breaks that could change meaning are kept.
Does it rename variables like Terser?
No. Renaming and dead-code removal save more bytes but need a full JavaScript parser. For production builds use your bundler (Vite, webpack, esbuild); this tool is for quick jobs.
Are licence comments kept?
Yes, if you leave 'Keep /*! licence */ comments' on. Comments starting with /*! are kept by convention.
Last reviewed 16 October 2026.
