Free Online Tool

JavaScript DeObfuscator

Transform obfuscated, minified, or compressed JavaScript code back into human-readable format. Decode hex strings, rename variables, add formatting, and make sense of scrambled code.

Buy me a ☕
Obfuscation Level None
Readability N/A

Obfuscated JavaScript

Characters: 0 | Lines: 0 | Size: 0 bytes | Obfuscation: None

Readable JavaScript

Characters: 0 | Lines: 0 | Size: 0 bytes | Readability: N/A

String Decoding

Automatically converts hex-encoded strings (\x48\x65\x6c\x6c\x6f) back to readable text ("Hello").

Smart Formatting

Adds proper indentation, line breaks, and spacing to make code structure clear and easy to follow.

Variable Renaming

Replaces cryptic hex names (_0x4a2f) with readable variable names (var_0, var_1) for clarity.

How to Deobfuscate JavaScript

Quick Steps:

  1. 1Paste obfuscated JavaScript code in the left panel
  2. 2Select deobfuscation options (format, decode, rename, comments)
  3. 3View the readable code instantly on the right
  4. 4Check obfuscation level and readability scores
  5. 5Copy or download the cleaned code

What Gets Deobfuscated:

  • Hex Strings: "\x48\x65\x6c\x6c\x6f" → "Hello"
  • Variable Names: _0x4a2f → var_0, _0x7b9c → var_1
  • Formatting: Adds proper indentation and line breaks
  • Comments: Adds helpful comments for code structure
  • Dead Code: Removes obfuscation artifacts

Before & After Example

Before Obfuscated Code

var _0xdead=o4k2j;function _0x4a2f(_0x7b9c,_0x12ef){const _0x9d4a="\x73\x65\x63\x72\x65\x74\x31\x32\x33";if(_0x7b9c==="\x61\x64\x6d\x69\x6e"){return true;}return false;}

After Readable Code

// Function: var_0 function var_0(var_1, var_2) { // Variable declaration const var_3 = "secret123"; // Conditional check if (var_1 === "admin") { // Return value return true; } // Return value return false; }

Transformation Examples:

Obfuscated:

_0x4a2f "\x68\x65\x6c\x6c\x6f" _0x12ef8a no spacing/lines

Readable:

var_0 "hello" var_1 proper formatting

Why Deobfuscate JavaScript?

Code Analysis & Debugging

Understand third-party libraries, debug minified production code, and analyze external scripts.

Security Research

Inspect suspicious scripts, analyze malware, and perform security audits on web applications.

Learning & Education

Study how popular libraries work, learn coding techniques, and understand complex algorithms.

Code Recovery

Recover readable code when original source files are lost or accidentally minified.

Understanding Limitations

What Can Be Recovered

  • Code structure and formatting
  • String values (if hex-encoded)
  • Function and control flow logic
  • Numerical values and operators

What Cannot Be Recovered

  • Original variable and function names
  • Original comments and documentation
  • Code that uses advanced obfuscation techniques (control flow flattening, etc.)
  • The exact original formatting style

Note: This tool provides basic deobfuscation. Advanced obfuscators may use techniques that are difficult or impossible to reverse automatically.

Frequently Asked Questions

Can I recover the original variable names?

No. Original variable names are permanently lost during obfuscation. Our tool renames them to readable placeholders (var_0, var_1, etc.) but cannot restore the original names.

Will deobfuscation work on all JavaScript code?

It works best on code obfuscated with basic techniques (variable renaming, string encoding, minification). Advanced obfuscation techniques may require manual analysis or specialized tools.

Is it legal to deobfuscate JavaScript?

Yes, for legitimate purposes like debugging your own code, security research, or learning. However, respect copyright laws — don't steal or redistribute deobfuscated proprietary code.

Can I deobfuscate code from websites?

Technically yes, but use ethically. It's acceptable for learning or debugging issues with scripts on your own site, but not for stealing proprietary code or bypassing security measures.