Python Obfuscator (Max)

Seven-layer Python obfuscator running entirely in your browser via Pyodide. Minify, rename identifiers, encrypt strings, mangle integers, pack bytecode via marshal/zlib/base64, multi-layer wrap, XOR-cipher final payload. 100% client-side, your code never leaves the page.

Tool Web & Dev Updated Apr 20, 2026
How to Use
  1. Paste your Python code into the input box.
  2. Pick which layers to apply - or hit "Max Security" to enable everything.
  3. Click Obfuscate. On the first click the tool downloads Pyodide (~6 MB, cached after) so CPython itself is used for correct tokenization, compilation, and marshalling.
  4. Hit Verify to run the obfuscated code inside Pyodide and confirm it still produces the same output.
  5. Copy or download the result as .py.
Source
Pyodide: not loaded
Obfuscation layers
Obfuscated output

The seven layers

1. Minify
comments / docstrings / type hints / blank lines
2. Rename
locals -> _0x hex - imports / builtins / dunders preserved
3. Encrypt strings
"text" -> __import__('base64').b64decode('...').decode()
4. Mangle integers
42 -> (0x2A ^ 0xAA ^ 0xAA) with random XOR chains
5. Bytecode pack
compile -> marshal.dumps -> zlib.compress -> b64 -> one line exec()
6. Multi-layer wrap
Nest layer 5 N times - every peel reveals another encoded blob
7. XOR cipher wrap
Final payload XOR-encrypted with a random key, decrypts + execs

What this is + isn't

Great for
IP protection on shipped Python, CTFs, puzzles, casual eyes, minification
Not for
Bypassing AV, fooling determined reverse engineers with dis + marshal
Browser only
Pyodide runs CPython in WebAssembly - no server, no upload, your code stays local

Frequently Asked Questions

Does my source leave the page?

No. Pyodide is CPython compiled to WebAssembly — it runs entirely inside your browser tab. No server, no upload, no API call.

Is this actually un-reverse-engineerable?

No obfuscator is. The bytecode-pack layer makes `dis` useless until the layers are peeled, but a determined reverse-engineer with `marshal.loads` + `dis` + time can still get the original logic back. Anyone claiming otherwise is selling something.

Will AV engines flag the output?

Possibly. Marshal/base64 packing is a common malware pattern and heuristic scanners may warn. This tool is designed for IP protection, CTFs, and puzzles — not for bypassing security software.

What does Max Security actually do?

Stacks all seven layers in order: minify → rename → encode strings → mangle integers → bytecode pack → multi-layer wrap (3 passes by default) → XOR cipher. Each layer amplifies the next; the final output is a single short line containing a blob that decrypts and executes itself.

Why is the first click slow?

Pyodide is a 6 MB WebAssembly Python runtime. First run downloads and initialises it; subsequent runs are instant (browser cache).

Can the obfuscated code still be imported or packaged?

It remains a valid single-file Python module. It can still be pip-installed, bundled with PyInstaller, or shipped as-is. Importing individual names from it requires a matching `__all__` declaration which this tool preserves.

Common Use Cases

Ship commercial Python scripts

Make the source hard to casually read before distributing.

CTF / puzzle challenges

Build "unreadable" challenges for reverse-engineering competitions.

Minify + strip types

Use only layer 1 (minify) as a pure size reducer.

Learn how packers work

Each layer is visible in the output - inspect the exec wrapper, the marshal blob, the XOR cipher.

Last updated: