Menu

PHP Deobfuscator

Reverse the output of our PHP Obfuscator. Detects the XOR+Base64 decoder function, decodes every obfuscated string call, evaluates arithmetic expressions, strips junk variables, and restores readable PHP.

PHP Deobfuscator Studio XOR + Base64
Ready
Pair with our PHP Obfuscator. This tool specifically reverses the output of obfuscatortools.com/tools/php-obfuscator. It detects the generated XOR decoder function (e.g. _dqnkj()), decodes every _dqnkj('...') call back to the original string, evaluates arithmetic like (184 - 84) to 100, and strips junk $_jN variables. Variable names like $_v1 cannot be recovered exactly — they become readable placeholders.
Variable renaming is lossy. The obfuscator replaced $userName → $_v1. That mapping is gone forever — the tool can only restore strings, numbers, and structure, not the original variable names. The output is readable but uses placeholder names.
Obfuscated PHP Input 0 chars
Deobfuscated PHP 0 chars
How This Deobfuscator Works

What the PHP Obfuscator Does

Our PHP Obfuscator applies four transformations to your source:

  1. String encoding — wraps every string literal in an XOR+Base64 decoder call: "USER" → _dqnkj('ODswOw==')
  2. Arithmetic obfuscation — replaces numbers with expressions: 100 → (184 - 84)
  3. Junk variables — injects dead code: $_j1 = 2; if ($_j1 < 0) { $_j1++; }
  4. Variable renaming — renames parameters: $name → $_v1

What This Deobfuscator Reverses

TransformationReversible?How
XOR + Base64 strings✅ YesDetects the decoder function, extracts the XOR key, decodes every call back to plaintext
Arithmetic expressions✅ YesEvaluates (184 - 84) → 100 using a safe parser
Junk variables✅ YesStrips lines like $_j1 = 2; if ($_j1 < 0) { $_j1++; }
Variable renaming❌ No (lossy)Names become $var1, $var2 — readable, but not the originals
Class / method names✅ PreservedThe obfuscator keeps these intact, so the deobfuscator sees them

The XOR Decoder Function

The obfuscator prepends a function like this:

function _dqnkj($s) {
    $k = 'mhuigntphqgi';
    $raw = base64_decode($s);
    $out = '';
    $kl = strlen($k);
    for ($i = 0; $i < strlen($raw); $i++) {
        $out .= $raw[$i] ^ $k[$i % $kl];
    }
    return $out;
}

This deobfuscator reads the $k = '...' key, Base64-decodes each argument, XORs it with the key, and restores the original string.

What It Cannot Do

  • Recover original variable names. The renaming is lossy — $userName became $_v1, and nothing can map it back except guessing from context.
  • Decode ionCube / Zend Guard / SourceGuardian. Those are bytecode-level, not string-level.
  • Handle custom obfuscators. This tool specifically targets our PHP Obfuscator's output. For other tools, use UnPHP.
  • Recover comments. The obfuscator strips them — they're gone forever.

Frequently Asked Questions

What obfuscator output does this reverse?
The output of obfuscatortools.com/tools/php-obfuscator. It detects the XOR+Base64 decoder function by its structure (base64_decode + ^ XOR + key), regardless of the function name.
Why can't it recover my original variable names?
Variable renaming is a one-way transformation. $userName → $_v1 loses the original name. The deobfuscator can't reverse it — it produces readable placeholders like $var1 instead.
Does it handle nested obfuscation?
No, not from other tools. If you obfuscated the output of this tool with another obfuscator, you'd need to deobfuscate in reverse order.
Does it evaluate arithmetic safely?
Yes. It only evaluates numeric expressions like (184 - 84) and (275 - 125) — never executes PHP. The parser only handles + - * / ( ) on numbers.
Is my code uploaded to your server?
No. Everything runs in your browser. Your code never leaves your device.
Can I download the deobfuscated PHP?
Yes. Click Download to save the output as deobfuscated.php.
What if the tool says "no decoder function found"?
Either your input is not from our PHP Obfuscator, or it uses a different pattern. Check that the input contains base64_decode and ^ XOR inside a function. If it does, report the pattern and we'll add support.

Related Tools

External Resources