We use cookies.This website uses essential cookies to operate core features. With your consent, we also use analytics cookies to understand traffic and improve the service. For more details, see our .
Was this tool helpful to use?
Your feedback helps us make it better
Identify the Python version of .pyc files via magic numbers to resolve compatibility issues.
Reads PYC header magic and matches the cloud service version table; unknown values are estimates, not exact support or executable validation. Files are uploaded; retention unverified. Reference
Choose filesDrag & Drop or Click to Upload PYC Files
Supports .pyc files, batch upload supported
Max 256 KB
Overview
Understand what the tool solves, how it works, and the boundaries of its data.
A .pyc file stores compiled Python bytecode. Its header begins with a magic number: a short value used by CPython to distinguish bytecode formats. This checker accepts a PYC file and returns a version label when its magic value matches a version known to the service, alongside the magic bytes shown in the result. It does not read or restore the original Python source.
In a standard PYC header, the first two bytes encode the numeric magic value in little-endian order; the next two bytes are carriage return and line feed. For example, the common Python 3.10 header prefix is 6F 0D 0D 0A. The first pair, 6F 0D, represents the integer 3439 when interpreted little-endian. A matching table can associate that value with a CPython bytecode version line.
The label is a format clue, usually a CPython major and minor version line. It is not a precise interpreter build string. A magic value does not reliably identify a patch release such as 3.10.8, the machine that created the file, or the environment in which it was used. CPython updates magic values when bytecode compatibility requires it; values can remain shared across multiple patch releases, and development versions may introduce intermediate values.
The header also contains fields after the magic bytes. For Python 3.7 and later, the PYC format includes flags and timestamp- or hash-related data. This checker focuses on the version and magic output; it does not report those later fields as a full header inspection.
Use the returned magic value as evidence to compare with a trusted CPython record or the interpreter you are investigating. A recognized value suggests a compatible bytecode format family, not that every byte in the file is intact. An unknown result means the value was not mapped to a known version by this service. It may belong to a newer or development build, another Python implementation, a modified file, or a file that is not a valid PYC.
Guide
Follow the workflow and verify inputs and outputs with practical examples.
Select files whose names end in lowercase .pyc. The page allows multiple files in one list, with a 256 KB limit for each file. Other extensions and uppercase .PYC names are rejected by the current form.
Confirm the names and sizes before analysis. Remove an individual file if it is not needed, or clear the list and select again.
Run the check to process the queued files in sequence. A file can show an error or be skipped if processing fails or the available usage allowance is reached.
Record the version label and magic bytes together. If the label is unknown, compare the bytes with an authoritative version record and any available filename tag, such as cpython-311. A mismatch is a reason to investigate the file’s origin, not to edit its header blindly.
Use cases
See how the tool fits into real work and everyday tasks.
When an interpreter reports a magic-number mismatch, identify the PYC’s format line and compare it with the interpreter expected to read it. If the matching source file is available, rebuilding the cache with the intended interpreter is generally a safer next step than changing header bytes.
For a small collection of PYC files without clear documentation, compare each result to group files by likely bytecode generation. Keep the original file and record the magic value so another person can reproduce the comparison.
Some bytecode inspection tools support only selected Python versions. A version-line estimate can help you decide what compatibility to check next, but it cannot guarantee that a decompiler supports the file or will recover readable source.
Q&A
Find concise answers to common questions and confusing cases.
No. The magic number identifies a bytecode format generation, not a dependable full version string. Several patch releases can use the same value.
Not by itself. The value may be absent from the service’s mapping, come from a development build or another Python implementation, or belong to a modified or truncated file. The result alone cannot distinguish these cases.
No. The check does not execute the bytecode or verify the remaining header, bytecode body, dependencies, or runtime environment. It only provides a header-based version clue.
No. It returns version and magic information; it does not reconstruct Python source, scan for malware, or certify where the file came from.
Notes
Review scope, result limitations, and important precautions before use.
Use this result as a preliminary format clue. It is not a file-integrity test, security scan, provenance check, or execution test.
The selected PYC is uploaded from the browser to cloud processing for analysis. The service’s file-retention period has not been verified, so do not upload confidential or proprietary bytecode unless you are permitted to share it and accept that handling.
The current form accepts lowercase .pyc files up to 256 KB each. The result depends on the service’s known-value mapping and may not cover every CPython release, prerelease, or other Python implementation. A recognized label does not confirm that the file body is valid or compatible with a particular machine.
MAGIC_NUMBER in recognizing bytecode format; checked 2026-10-02.Related
Discover related tools, collections, and available API capabilities.