Skip to content

JavaScript Minifier

Strip comments and whitespace from JavaScript safely.

5.0 (1 rating)

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 policy

Share 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

Click a star to rate this tool

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. 1 Paste JavaScript source.
  2. 2 Choose whether to Keep /*! license */ comments.
  3. 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.

  • 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.

Browse all guides

Report an issue

Something broken or not quite right? Tell us and we will look into it.

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