Remove Comments from JavaScript

Strip comments from JavaScript code.

100% Private — Nothing is Uploaded

All processing happens locally in your browser. Your files never leave your device and are never sent to any server.

Other languages

Remove JavaScript Comments

JavaScript supports both line comments (//) and block comments (/* ... */). This tool removes them all in one click using a smart tokenizer that understands strings, template literals, and regular expressions — so a // inside "https://" or a /* inside a regex will never be touched.

Why remove JS comments?

  • Smaller bundles — every byte matters for JS in the critical path.
  • Faster parse time — browsers skip whitespace and comments faster.
  • Cleaner output — remove leftover debug notes and TODOs.