Removes comments and whitespace without renaming variables, so the output is safe to use as-is.
Processing and privacy
Processing varies by tool. Check the instructions for local processing, server requests, external services and any file or request limits before entering sensitive information.
Read the privacy policyShare this tool
Found it useful? Send it to a friend or teammate.
Rate this tool
5.0
1 rating
- 5 stars 1
- 4 stars 0
- 3 stars 0
- 2 stars 0
- 1 star 0
Clear instructions
Find steps, examples and limitations below.
Use online
Open the tool in a supported web browser.
Free to use
No sign-up required. Tool-specific limits may apply.
How to use the JavaScript Minifier
Reduce JavaScript comments and whitespace without offering variable-renaming controls.
- 1 Paste JavaScript source.
- 2 Choose whether to Keep /*! license */ comments.
- 3 Review the size summary, copy the result and run your application tests before deploying it.
Example and practical tips
Minify a small utility script while retaining its license notice.
Frequently asked questions
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.
Practical guides
-
How to Use JavaScript Minifier
Minify JavaScript online by removing comments and extra whitespace to reduce file size. Free JS minifier that runs in your browser. Copy the output.
Report an issue
Something broken or not quite right? Tell us and we will look into it.