JavaScript Obfuscator

make your JavaScript hard to read, copy or tamper with
Runs 100% in your browser · nothing uploaded
Identifiers & strings
Structure
Opt-in — these change how your code runs
reproducible output + shareable link
Your JavaScript 0 B
Obfuscated

        
Your obfuscated code appears here.
Paste JavaScript on the left — it updates as you type.
Syntax error
Fix the error on the left and the result updates automatically. Your code is kept exactly as you typed it.
Obfuscating…
Check the obfuscated code behaves identically to your input — run locally, nothing is uploaded.
Obfuscated in your browser with the javascript-obfuscator engine. Your source never leaves this page.
How this works & what each level does

This tool transforms your JavaScript so it still runs identically but is very hard for a person to read, copy or tamper with. Everything happens in your browser using the open-source javascript-obfuscator engine (the same engine behind obfuscator.io) — your code is never sent to any server.

Light

Renames identifiers and moves strings into a lookup table. Barely any size or speed cost. Good when you just want to discourage casual reading.

Medium (default)

Adds control-flow flattening, dead-code injection, number and object-key transforms, and base64-encoded strings. A solid balance of protection and performance.

Heavy

Pushes every transform to maximum, RC4-encodes strings and makes the output self-defending (it breaks if re-beautified). Expect larger, slower code.

Behavior

Every level is behavior-preserving by default — the result does exactly what your input did. The two opt-in options under Advanced (Remove console output and Anti-debugging traps) deliberately change runtime behavior; they are off unless you turn them on.

A note on what obfuscation can and can't do

Obfuscation raises the effort to understand or reuse your code. It is not encryption: anything that runs in a browser can, with enough effort, be reverse-engineered. Never hide secrets like API keys in client-side code — obfuscated or not.