JS Deobfuscator

Make obfuscated or minified JavaScript readable again

Reverse common JavaScript obfuscation tricks: decode \x and \u escapes, inline string-array lookups, turn hex numbers back into decimals, restore !0/!1 to true/false and obj["prop"] to obj.prop - then beautify the result so it is readable.
Try an example:

Output will appear here...

About JS Deobfuscator

How it works

  1. Strings full of escapes like "\x48\x65" are decoded to the characters they stand for.
  2. A common trick stores every string in an array (var _0xa = ["log", ...]) and reads them by index; those lookups are replaced by the strings themselves.
  3. Hex numbers become decimals, !0 and !1 become true and false, void 0 becomes undefined, and obj["name"] becomes obj.name where that is valid.
  4. Finally the code is re-indented with js-beautify. The counts show what was changed.

What you need

  • JavaScript code - minified, packed or obfuscated.

Tips

  • Run it twice on heavily obfuscated code: inlining can reveal more patterns.
  • Use it to inspect suspicious scripts safely - the code is only transformed as text, never run.
  • Variable names like _0x3a1f cannot be recovered; rename them yourself as you work out what they do.

Limitations

  • Original variable names and comments are lost forever during obfuscation and cannot be restored.
  • Advanced protections (rotated or encrypted string arrays, self-defending code, control-flow flattening) are only partly undone.

Runs in your browser. The code is transformed as text in your browser. It is never executed and never uploaded.

Frequently asked questions

Can obfuscated JavaScript be fully reversed?+

Not completely. The logic can be made readable again, but original names and comments are gone, and strong obfuscators add layers that need manual work. This tool removes the most common tricks.

Is it safe to deobfuscate a malicious script here?+

Yes. The code is only processed as text - it is never run - and everything happens in your browser.

What is the difference between minified and obfuscated code?+

Minified code just removes spaces and shortens names to make files smaller. Obfuscated code is deliberately scrambled to be hard to understand. Beautifying fixes the first; deobfuscating is needed for the second.