Minify JavaScript online by removing comments and extra whitespace to reduce file size. Free JS minifier that runs in your browser. Copy the output.
About this tool
Reduce JavaScript comments and whitespace without offering variable-renaming controls.
How to use JavaScript Minifier
- Paste JavaScript source.
- Choose whether to Keep /*! license */ comments.
- Review the size summary, copy the result and run your application tests before deploying it.
Worked example
Minify a small utility script while retaining its license notice.
Does this bundle modules or remove unused code?
No. It is not a full build pipeline, module bundler or tree-shaking system.
Can minification change behavior in edge cases?
Unusual syntax and whitespace-sensitive cases need testing. Preserve the source and verify the result in your target environment.
Explore Coding Tools · More practical guides