# uncompyle6

> Cross-version decompiler that translates Python bytecode back into equivalent Python source, accepting bytecode from Python 1.0 through 3.8 as well as some PyPy bytecode and Dropbox's Python 2.5. It disassembles code objects with the companion xdis library and parses the instruction stream into a grammar-based tree from which source is printed; it can also deparse just the fragment around a given bytecode offset, which the author's trepan debuggers use for exact location reporting. It succeeds the older decompyle, uncompyle and uncompyle2 forks.

- Type: Tool
- Targets: App · Binary
- Category: Native analysis tools
- Relationship: Foundation tool
- Sources reviewed: 2026-10-19
- Added to the catalog: 2026-10-19
- Original resource: <https://github.com/rocky/python-uncompyle6>
- Primary source: <https://github.com/rocky/python-uncompyle6/blob/91298ba80e322cfb8736ab8a697509527297a7a9/README.rst>
- Catalog page: <https://awesomerea.org/resources/uncompyle6/>
- Record JSON: <https://awesomerea.org/resources/uncompyle6/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/uncompyle6/index.md)

## Requirements & limits

- Latest release at review: 3.9.3, published 2025-09-29 on GitHub and PyPI; the reviewed master commit is 34 commits later and reports 3.9.4.dev0. Installing from PyPI, like the master branch, is meant for running on Python 3.11+; older interpreters back to Python 2.4 use the version-specific tarballs, eggs or wheels on GitHub Releases, built from separate git branches. It depends on xdis 6.3+, spark-parser and click.
- The README reports testing on bytecode from Python 1.4, 2.1–2.7 and 3.0–3.8 and later PyPy versions. Python 3 support is strongest around 3.3–3.4 and weakens further away, control flow is the biggest known problem, and the author does not intend serious work on 3.8 or 3.9, pointing to the separate decompyle3 for 3.7 and 3.8. Bytecode newer than 3.8 is not decompiled, and candidate-release magic numbers, some Python 3.6 magic variants, encrypted or custom-interpreter bytecode other than Dropbox's old 2.5, obfuscated code, Cython and MicroPython are not handled.
- Input .pyc or .pyo files come from the user; it cannot decompile Py2EXE executables directly, and bytecode bundled by such packagers has to be extracted first. The --syntax-verify option checks only that the output is valid Python syntax, so the README suggests cross-checking with other uncompyle6 versions or other decompilers such as pycdc. Recovered source remains subject to the rights of the original program’s owner.
- GPL-3.0-or-later per pyproject.toml, with the GPL-3.0 text in COPYING.

## Primary sources

1. <https://github.com/rocky/python-uncompyle6/blob/91298ba80e322cfb8736ab8a697509527297a7a9/README.rst>
2. <https://github.com/rocky/python-uncompyle6/blob/91298ba80e322cfb8736ab8a697509527297a7a9/README.rst#L77-L126>
3. <https://github.com/rocky/python-uncompyle6/blob/91298ba80e322cfb8736ab8a697509527297a7a9/README.rst#L176-L299>
4. <https://github.com/rocky/python-uncompyle6/blob/91298ba80e322cfb8736ab8a697509527297a7a9/NEWS.md>
5. <https://github.com/rocky/python-uncompyle6/blob/91298ba80e322cfb8736ab8a697509527297a7a9/pyproject.toml>
6. <https://github.com/rocky/python-uncompyle6/blob/91298ba80e322cfb8736ab8a697509527297a7a9/uncompyle6/version.py>
7. <https://github.com/rocky/python-uncompyle6/blob/91298ba80e322cfb8736ab8a697509527297a7a9/COPYING>
8. <https://github.com/rocky/python-uncompyle6/releases/tag/3.9.3>
9. <https://pypi.org/project/uncompyle6/3.9.3/>

## More in Native binaries

- [ret-sync](https://awesomerea.org/resources/ret-sync/index.md) · Tool
- [PyInstaller Extractor (pyinstxtractor)](https://awesomerea.org/resources/pyinstxtractor/index.md) · Tool
- [Binary Analysis Platform (BAP)](https://awesomerea.org/resources/bap/index.md) · Tool
- [Reko](https://awesomerea.org/resources/reko/index.md) · Tool
- [Dyninst](https://awesomerea.org/resources/dyninst/index.md) · Tool
- [goblin](https://awesomerea.org/resources/goblin/index.md) · Tool

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
