Free JavaScript Obfuscator

Make your JavaScript harder to read and reverse-engineer — free, no sign-up, nothing leaves your browser.

Light: renames variables and hides strings. Medium: adds dead-code injection. Heavy: adds control-flow flattening — much harder to read, but noticeably slower to run.

What obfuscation actually does (and doesn't)

Obfuscation rewrites your code so it still runs exactly the same way, but is much harder for a person to read — variable and function names become meaningless strings like _0x3f1a, text strings get encoded and decoded at runtime instead of sitting in the code as plain text, and at higher settings the actual order code executes in gets deliberately scrambled behind extra logic. It's a genuine speed bump against casual copying or a quick look at "view source," not encryption — anyone sufficiently determined, with the obfuscated file and enough time, can still work through it, since the browser itself has to be able to run the exact same code you do. Think of it as raising the effort required, not making reverse-engineering impossible.

Frequently asked questions

What's the difference between the three levels?

Light renames variables and hides string literals — fast to run, noticeably harder to read than the original. Medium adds dead-code injection, scattering unused, decoy code throughout to make the real logic harder to pick out. Heavy adds control-flow flattening on top, which restructures how the code's logic branches so the execution order is much harder to follow just by reading it — this is the most thorough option, but also makes the resulting code run slower than the lighter levels.

Will the obfuscated code still work exactly the same?

Yes — obfuscation only changes how the code looks, never what it does. If something behaves differently after obfuscating it, that's worth reporting, but the transformation itself is designed to be fully behavior-preserving.

Can obfuscated JavaScript be reversed or de-obfuscated?

Partially, with enough effort — tools exist that can reformat the code's structure back to something readable, though a renamed variable's original, meaningful name is genuinely gone for good, and a human still has to work out what the code actually does from there. Obfuscation raises the cost of that process significantly, especially at the Heavy setting, but it isn't the same guarantee that real encryption gives you.

Why did obfuscating make my file so much bigger?

This is expected, especially at Medium and Heavy — encoding every string and injecting decoy code both add real bytes to the file. A larger, harder-to-read file is the trade-off obfuscation makes on purpose.

Is my code sent anywhere?

No. The obfuscator runs entirely in your browser — nothing you paste in is uploaded to a server.