How to use the JavaScript Obfuscator
- Paste the JavaScript you want to protect.
- Pick a protection level — Light keeps the code fast and small, Strong makes it much harder to reverse.
- Click Obfuscate, test the result, then copy or download it.
What obfuscation does
Obfuscation transforms working code into an equivalent version that is very hard for people to read. This tool uses the open-source javascript-obfuscator engine: identifiers are renamed to meaningless hex names, strings are moved into an encoded array, and at higher levels the control flow is flattened into a state machine and dead code is injected.
Choosing a level
- Light — renaming and string array; small overhead. Good for most front-end code.
- Medium — adds control-flow flattening, string encoding and splitting. Code grows and runs slower.
- Strong — adds dead code injection and more aggressive transforms. Use only on code that isn’t performance-critical.
Know the limits
Obfuscation slows reverse engineering down — it doesn’t make code secret. Anything that runs in a browser can eventually be analysed, so never put API secrets, passwords or license keys in client-side code. Always test the obfuscated output, and keep your original source safe: obfuscation can’t be undone.
Private by design
Obfuscation runs entirely in your browser — your code is never uploaded, so it’s safe for proprietary projects.
Tools that pair well with the JavaScript Obfuscator
- JavaScript Minifier — Paste JavaScript and get production-ready minified code from Terser — the same engine used by Vite, webpack and Rollup — with real before/after and gzipped sizes.
- JavaScript Formatter — Unminify and pretty-print JavaScript, JSON or JSX with your preferred indentation and brace style — or strip whitespace and comments with a verified minifier.
- AES Encrypt & Decrypt — Protect a note, secret or config value with a password using AES-256 — or decrypt text produced by openssl enc.
- Hash Generator — Compute MD5 and SHA hashes of any text or file instantly, create HMAC signatures, and paste an expected checksum to verify a download.