URSY.IOPART OF THE URSY NETWORKSign in400 free tools

Developer Tools

JavaScript Whitespace Minifier

Strip comments and whitespace from JS — honestly named, string-safe.

Free No account Runs on this device
Developer Tools
Tool ready

Your inputs stay in this browser tab.

Powering up the tool…

TOOL JAVASCRIPT-M

What this tool does

About the javascript whitespace minifier

Not a compiler: no renaming, no tree-shaking, no risk.

How to use it

  1. Paste the JS.
  2. Read the stripped result and savings.
  3. Test it — you always test it.
  4. For production bundles, use a real minifier (terser et al.).

Useful for

  • Shrink a snippet for an inline tag.
  • Strip comments before sharing.
  • Squeeze a bookmarklet under length limits.

Straight answers

JavaScript Whitespace Minifier FAQ

Why “whitespace minifier” and not just minifier?

Truth in labelling: real minifiers parse and rewrite (rename variables, drop dead code) and need a full JS engine grammar. This tool removes comments/whitespace with string-aware care — meaning-preserving by construction, modest by design.

Can it break anything?

The known edge: automatic-semicolon-insertion code that RELIED on line breaks. Well-formed code with semicolons survives untouched; cursed code was already cursed.