Skip to content

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.

About this tool

Reduce JavaScript comments and whitespace without offering variable-renaming controls.

How to use JavaScript Minifier

  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.

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.

Put this guide into practice

Explore Coding Tools · More practical guides

Accessibility Menu

Personalize your experience. Open with Ctrl+U (Option+U on Mac). Preferences stay in this browser when storage is available.

Move / Hide Widget

Restore at any time with Ctrl+U (Option+U on Mac).

Accessibility statement and help