JavaScript Comment Remover and Whitespace Compactor

Strip // and /* */ comments and blank lines from JS or JSON-like code.

About this tool

Respects string and template literals so URLs like "http://x" survive. Regex literals containing // or /* are not detected, so review the output. This is not a full minifier.

Related: JSON Formatter & Validator · Base64 Encode & Decode · URL Encoder & Decoder · SHA-256 / SHA-1 Hash Generator · Unix Timestamp Converter