JS Obfuscator

Obfuscate JavaScript code to make it harder for third parties to read and analyze. Supports multiple options including string array extraction, control flow flattening, and self-defending code.

Input data is processed in your browser
Data is never sent to a server

Tool

0 chars

or drag & drop a file

Processing happens entirely in your browser; your code is never sent anywhere. Obfuscation makes analysis harder — it does not guarantee secrecy.

What is the JS Obfuscator?

This tool raises the bar for third-party analysis of your JavaScript by renaming variables to meaningless names and rearranging strings and control flow so the logic is harder to follow — useful for distributed scripts or code you’d like to give lightweight protection.

It runs the popular javascript-obfuscator library directly in your browser, so your code is never sent to a server. You can combine several options depending on your needs: string array extraction, control flow flattening, dead code injection, and self-defending code.

How to Use

  1. Paste your JavaScript code into the input field.
  2. Choose the options you need (string array extraction, control flow flattening, dead code injection, etc.) and click "Obfuscate".
  3. Use "Copy result" or "Download" to get the obfuscated code.
  4. Turn on "Auto obfuscate" to update the result in real time as you edit the input.

FAQ

What's the difference between obfuscation and minification?

Minification removes whitespace and comments to reduce file size. Obfuscation renames variables to meaningless names and rearranges code (such as moving strings into an array) to make the logic harder for a human to read. Obfuscated code is often larger than minified code.

Does obfuscation fully hide my code?

No. Since JavaScript must be delivered in an executable form to run in a browser, anyone can technically obtain the code that actually runs. Obfuscation raises the effort required to analyze it — it does not guarantee true secrecy.

Why is "Flatten control flow" labeled "heavy, slow"?

Control flow flattening restructures the program's execution order (typically into a switch-based dispatcher), which increases resistance to analysis but also significantly increases output size and runtime overhead. On larger code, the obfuscation process itself can take several seconds.

Can obfuscated code be converted back to the original?

No. This tool only performs one-way obfuscation; there is no reversal feature. Always keep a separate copy of your original source code.

Is my code sent to a server?

No. All obfuscation happens entirely in your browser — nothing is sent anywhere.