Python Marshal Decrypt
Reverse a marshal loader and recover readable Python source — base64-decode, decompress (zlib/zstd), unmarshal, decompile, plus disassembly and a downloadable .pyc. Runs 100% in your browser.
Why use this tool?
Use the Marshal Decrypt tool when you have a marshal loader — the exec(marshal.loads(base64.b64decode("…"))) shape produced by marshal "encryptors" and simple packers — and want the readable Python back. It extracts the base64 payload, decompresses it if the loader used zlib or zstd, unmarshals it into a code object, decompiles that to source, and also shows the full disassembly and a downloadable .pyc. It's the exact inverse of the Marshal Encryptor, and it runs entirely in your browser.
Paste a marshal loader — e.g. exec(marshal.loads(base64.b64decode("...")))Paste your own loader, or generate one with the Marshal Encryptor to try it.
Runs in your browser. Recovered source is a best-effort reconstruction from bytecode — simple code comes back cleanly, but complex code can be partial, comments/spacing/quote style are lost, and names removed by obfuscation can't be restored. Producing valid Python doesn't prove it behaves identically to the original. If you ship Python and need a check that survives being unmarshalled, keep the decision on a server with a license system like Licers.
If unmarshaling brings the code back, so does the license check inside it.
A marshal loader is just a code object the interpreter has to run, so it decodes straight back to constants, strings and control flow — a hard-coded key or trial check comes out with it, ready to be read or patched. Encoding only slows someone down. Licers keeps the decision on a server with Ed25519-signed, device-bound responses, so a recovered or patched client still can't forge a valid license.
Tool facts
- Supported Python
- Python 3.10 – 3.14 (match the build)
- Input limit
- Limited only by your device
- Last reviewed
- 2026-09-05
What it can't do
- •Guarantee exact original source — recovery is best-effort; complex code can come back partial or slightly wrong.
- •Restore comments, blank lines, or the original quote style — those aren't stored in bytecode.
- •Un-obfuscate names — identifiers already renamed by an obfuscator stay renamed.
- •Recover Python 3.14 source yet — the decompiler can't read that bytecode; you get disassembly + a .pyc.
About Python Marshal Decrypt
A marshal loader isn't encrypted — it's encoded. marshal.dumps() serializes a compiled code object to bytes; base64 makes those bytes printable; zlib or zstd (optionally) shrink them. The loader reverses that chain at import time and hands the code object to exec(). This tool does the same reversal but never runs your code: base64-decode, decompress, then marshal.loads() to recover the code object — then a decompiler (pycdc / Decompyle++, compiled to WebAssembly) rebuilds readable source, with the exact disassembly and a rebuilt .pyc alongside it.
Recovery is best-effort and depends on the Python version, because a code object's format changes between releases. In practice pycdc rebuilds clean source through Python 3.12, partial source on 3.13 (the newest opcodes can't always be reconstructed), and can't yet read 3.14 bytecode at all — for 3.14 you get the complete disassembly and a .pyc to try elsewhere. Pick the version the loader was built for and the tool loads the matching CPython (via Pyodide) so opcodes decode correctly and the .pyc carries the right magic number. "Auto-detect" reads the compression (zlib/zstd) from the loader text.
Be clear-eyed about what a decompiler can and can't return: comments, blank lines and quote style are gone (bytecode doesn't store them), names already scrambled by an obfuscator stay scrambled, and producing valid-looking Python doesn't prove it behaves identically to the original — always sanity-check against the disassembly. For a second opinion, download the .pyc and run it through the dedicated .pyc decompiler, or inspect opcodes with the bytecode disassembler. The Marshal Encryptor builds these loaders; how Python marshal works and reversing marshal-obfuscated bytecode go deeper.
Frequently Asked Questions
Explore Other Tools
Python .pyc Decompiler
Decompile a compiled Python .pyc back to readable source with pycdc — in your browser via WebAssembly. Best-effort for 3.0–3.12, partial 3.13, disassembly 3.14.
Python Bytecode Disassembler
Disassemble Python to CPython bytecode with the dis module — explore opcodes, code objects, jumps and constants. Runs in your browser.
Python Type Checker
Type-check your Python online with mypy — runs 100% in your browser via WebAssembly. Pick a target Python version (3.8–3.14) and strict mode.
Code to Flowchart
Turn Python code into a flowchart from the real AST — deterministic, no AI. Handles if, match, loops, try/except and async, with a control-flow-graph mode, unreachable-code highlighting, and Mermaid/SVG/PNG export.