Menu
Static Analysis • No Execution

Python Deobfuscator

Decode common Python obfuscation strings — Base64, Hex, XOR, Zlib, Gzip, ROT13 and nested layers. Paste code, click deobfuscate, get readable output. Runs entirely in your browser.

No Code Execution Base64 / Hex / XOR Zlib / Gzip Multi-Layer Free
Deobfuscation Studio Static Decode
Ready
How this works: Static string decoding — no Python execution. Extracts encoded payloads from common exec wrappers. If a payload uses a custom algorithm, it will honestly report that decoding failed.
Security warning: Never run obfuscated Python from untrusted sources. Use this tool for static analysis only. If you must execute, use an isolated VM.
Obfuscated Python 0 chars
Decoded Output 0 chars
Understanding Python Obfuscation & Deobfuscation

What Is Python Obfuscation?

Python obfuscation transforms readable source code into a form that is difficult for humans to understand, while preserving runtime behavior. Since Python is usually distributed as source or bytecode, anyone who receives your script can read it. Obfuscation raises the cost of reverse engineering — it does not make it impossible.

The most common pattern is the exec wrapper: a short statement that decodes a hidden payload and executes it.

exec(__import__('base64').b64decode("cHJpbnQoJ29iZnVzY2F0ZWQnKQ=="))

When you run that, Python decodes the Base64 and executes the result. The readable code only exists in memory. A static deobfuscator like this one lets you see the payload without running it.

Common Python Obfuscation Patterns

PatternExampleSupported
Base64 + execexec(base64.b64decode("..."))✅ Yes
Hex + execexec(bytes.fromhex("..."))✅ Yes
Zlib + Base64exec(zlib.decompress(base64.b64decode("...")))✅ Yes
Gzip + Base64exec(gzip.decompress(base64.b64decode("...")))✅ Yes
Simple XORexec(xor(data, key))⚠️ Simple cases
ROT13exec(codecs.decode("...", "rot13"))✅ Yes
Custom algorithmUnknown XOR scheme, byte shuffling❌ No
Bytecode encryptionmarshal.loads(decrypt(...))❌ No

How This Tool Decodes

  1. Extract the payload. Scans for encoded string literals inside common wrappers.
  2. Try decodings in order. Base64 → Hex → Zlib → Gzip → ROT13. On success, checks whether output is again encoded.
  3. Peel nested layers. Repeats until readable Python source or no further progress.
  4. Report honestly. On custom algorithms, shows decoded intermediate layers and stops.

This is why the tool never fakes output. If nothing decodes, it says so — instead of pretending the input is the answer.

Why "Correct" Deobfuscation Is Hard

JavaScript deobfuscation often just evaluates code in a sandbox. Python obfuscators can:

  • Encrypt the bytecode with a custom algorithm and embedded key.
  • Split strings across variables and join at runtime.
  • Use marshal to serialize code objects.
  • Tamper with the interpreter frame or patch built-ins via ctypes.

Reversing those requires executing the code in a controlled environment or decompiling bytecode. This tool does neither — it handles the static encoding layer, the most common form of casual obfuscation.

For heavy obfuscation, use dedicated tools:

  • de4py — supports Jawbreaker, BlankOBF, PlusOBF, Wodx, Hyperion.
  • PyLingual — online Python bytecode decompiler.
  • safe-exec — blocks exec/eval and reveals the payload.
  • Decompyle++ — cross-version bytecode decompiler.

What This Tool Is Good For

  • Understanding a script before running it. Decode the payload to see what it actually does — safely.
  • Learning how obfuscation works. Most obfuscators use simple wrappers.
  • Quick first-pass analysis. Before reaching for heavier tools, check whether the payload is just Base64 or Hex.

What This Tool Cannot Do

  • It cannot execute code. It never runs the obfuscated file.
  • It cannot reverse custom encryption. Unknown XOR keys or custom algorithms stop the tool.
  • It cannot decompile .pyc. Use a dedicated decompiler for bytecode.
  • It cannot reconstruct executed runtime behavior. Static analysis only shows structure and strings.

Safety Practices

  • Never run obfuscated Python from untrusted sources on your main machine.
  • Decode first, review, then decide whether to execute in an isolated VM.
  • Keep the deobfuscated output as your source of truth — do not re-execute the original.

Frequently Asked Questions

Does this tool execute Python code?
No. It performs static string decoding only. Your code is never run — not in your browser, not on our server.
Does my code get uploaded anywhere?
No. Everything runs in your browser. No code or data leaves your device.
What formats can it decode?
Base64, Hex, ROT13, Zlib-compressed payloads, Gzip-compressed payloads, simple XOR, and nested combinations of these — when they appear inside common wrappers like exec(base64.b64decode(...)).
Why does it say "unsupported transformation"?
Because the payload uses a custom algorithm or key that cannot be decoded statically. The tool will not fake output. You may need a dedicated reverse-engineering tool.
Does it handle .pyc files?
No. .pyc is compiled bytecode — it requires a decompiler like Decompyle++ or PyLingual.
Can it decode custom XOR keys?
Only when the key is a simple single byte or short known string embedded in the loader. Unknown or complex XOR schemes are reported as unsupported.
Is it free?
Yes. No account, no limits, no tracking.
Does it work offline?
Yes. Once the page loads, you can disconnect and use the tool without internet.

Related Tools

External Resources