Obfuscate JavaScript with Low, Medium, and High presets. Control flow flattening, dead code injection, RC4 string encoding, self-defending, and debug protection.
The JavaScript Obfuscator is powered by the `javascript-obfuscator` library — the most capable open-source JavaScript obfuscation engine. It protects your source code against reverse engineering through three graduated protection presets (Low, Medium, High), each activating a different combination of transformation techniques. Individual options can be toggled independently to customise the protection profile without leaving a preset entirely. All processing runs client-side via a dynamic import in your browser — your code never leaves your device.
QWhat is control flow flattening?
Control flow flattening wraps code branches inside a dispatch loop with a switch statement, making the logical execution order opaque to static analysis tools and human reviewers.
QWhat is the difference between Low, Medium, and High presets?
Low: minimal footprint, fast execution, identifier renaming only. Medium: adds control flow flattening, dead code injection, and Base64 string encoding — best for most use cases. High: maximum protection with RC4 encoding, self-defending code, and debug protection — significantly increases file size.
QWill obfuscation break my code?
For standard JavaScript that does not rely on function.name, stack traces, or eval-based code loading, obfuscation should preserve runtime behaviour. Self-defending mode prevents the file from running if reformatted, so test in your target environment.
QIs my code sent to a server?
No. The javascript-obfuscator library is dynamically imported and runs entirely in your browser. Nothing is transmitted to any server.