JavaScript Minifier

Strip comments and whitespace from JavaScript in your browser. A lightweight, string- and regex-aware minifier; nothing is uploaded.

About this tool

Paste JavaScript and get a smaller version with comments and extra whitespace removed. Strings, template literals and regex literals are preserved. It does not rename variables or add semicolons, so code that relies on automatic semicolon insertion across lines should be checked; use a full bundler for production builds.

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