Extract PyInstaller and py2exe applications — or a PYZ archive on its own — repair their bytecode, and recover readable Python source.
The file is identified from its PyInstaller cookie, py2exe PE resource or PYZ\0 header, before normal EXE handling.
Embedded modules are unpacked and stripped PYC headers are rebuilt from an intact sibling.
Read recovered source under sources/ or download raw bytecode from pyc/.
For packaged Python modules, type stubs, dependencies and native libraries in a .whl, use the Python Wheel Viewer and WHL Extractor. It preserves package contents without installing them.
PyInstaller combines a native bootloader, a Python interpreter, extension modules, and the application's compiled .pyc files. The payload is a CArchive appended to the launcher. A distinctive cookie near the end of the file points to its table of contents, which is why the same detection works for Windows, Linux, and macOS builds.
The original formatting and comments are not present in bytecode, but function names, constants, imports, control flow, and often local variable names remain. That is normally enough to reconstruct useful Python source.
Running a tool such as pyinstxtractor on an application leaves a folder containing PYZ-00.pyz — the compressed module store where nearly all of the program actually lives. That file can be uploaded here directly. It is read from its own header: the four bytes PYZ\0, the magic number of the interpreter that froze it, and a table of contents addressing one zlib-compressed module each.
Each recovered module is written out as an ordinary .pyc. PyInstaller stores modules without a header, so the header is rebuilt from the archive's own magic number rather than from whatever Python happens to be installed on the server — an archive frozen by Python 3.8 produces Python 3.8 bytecode. Modules that cannot be decompressed, which is what an archive frozen with PyInstaller's --key option looks like from outside, are named individually and never discard the modules that were readable.
A .pyz file is just as likely to be a PEP 441 zipapp, which is an entirely different thing: a plain ZIP archive with __main__.py at its root, sometimes preceded by a #! line so it can be run directly. The two formats are told apart by their bytes, not their extension.
There is usually nothing to decompile in a zipapp — it normally contains the developer's own .py source, which is preserved exactly as packaged. Any .pyc file with no packaged counterpart is decompiled, and everything else is kept under resources/ so the whole bundle stays browsable and downloadable.
PyInstaller strips the normal header from some entry-point modules. Sending those bytes directly to a Python decompiler either fails or, worse, selects the wrong bytecode format. After extraction this service verifies every module and repairs a bare code object with the complete header from an intact sibling in the same archive.
PYTHONSCRIPT; larger builds often add a ZIP containing the rest of the modules.Every recovered bytecode file is kept under pyc/, even when source decompilation fails. Successful modules appear under sources/ with the extracted package structure preserved. DECOMPILATION-NOTES.txt records the detected Python version, header repairs, encrypted or unsupported archives, and individual files the bytecode decompiler could not handle.
Python bytecode changes between interpreter releases. For a version newer than the installed decompiler supports, the service preserves the raw modules and says which version was found rather than returning misleading source.
Usually. PyInstaller is a packager, not a native Python compiler. If the archive is readable and its Python bytecode version is supported, much of the source can be reconstructed.
The other modules are still decompiled. The failed PYC is kept under pyc/ and listed in the notes instead of aborting the entire application.
The extractor attempts to recover the embedded key used by supported PyInstaller releases. When no key can be recovered, the result explains that the archive is encrypted and preserves anything that could be extracted.
Yes. PyInstaller detection reads the cookie near the end of the file and does not depend on a .exe suffix.
Yes. Both a PyInstaller PYZ-00.pyz and a PEP 441 zipapp are accepted, and the format is decided from the file's header rather than its name. A renamed archive still works, and a .pyz that is neither is explained instead of silently producing nothing.
Use the Python bytecode decompiler when you already have a .pyc or .pyo file and do not need to unwrap an executable.