What the PHP Obfuscator Does
Our PHP Obfuscator applies four transformations to your source:
- String encoding — wraps every string literal in an XOR+Base64 decoder call:
"USER"→_dqnkj('ODswOw==') - Arithmetic obfuscation — replaces numbers with expressions:
100→(184 - 84) - Junk variables — injects dead code:
$_j1 = 2; if ($_j1 < 0) { $_j1++; } - Variable renaming — renames parameters:
$name→$_v1
What This Deobfuscator Reverses
| Transformation | Reversible? | How |
|---|---|---|
| XOR + Base64 strings | ✅ Yes | Detects the decoder function, extracts the XOR key, decodes every call back to plaintext |
| Arithmetic expressions | ✅ Yes | Evaluates (184 - 84) → 100 using a safe parser |
| Junk variables | ✅ Yes | Strips lines like $_j1 = 2; if ($_j1 < 0) { $_j1++; } |
| Variable renaming | ❌ No (lossy) | Names become $var1, $var2 — readable, but not the originals |
| Class / method names | ✅ Preserved | The 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 —
$userNamebecame$_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
PHP ObfuscatorObfuscate PHP source
PHP EncoderEncode PHP (Base64, Hex)
JS AST ObfuscatorReal JavaScript obfuscation
HTML EncoderEncode HTML safely
Base64 ObfuscatorEncode any text
JS ObfuscatorMain obfuscator tool
External Resources
- PHP Manual: base64_decode()
- PHP Manual: Bitwise operators (XOR)
- UnPHP — general PHP deobfuscator