Bytecode file formats
Compiled programs for a virtual machine rather than a real processor. The same file runs anywhere that virtual machine runs, which is why Java, Python and WebAssembly use it.
Formats
.BC
LLVM bitcodeLLVM compiler IR in binary form, as a packed bitstream of blocks.
.BEAM
Erlang BEAM moduleOne compiled Erlang or Elixir module, in IFF-style chunks.
.CIL
CIL (.NET intermediate language)The bytecode of .NET: method bodies, instruction encoding and every opcode.
.CLASS
Java class fileThe JVM Specification’s class file, from JDK 1.0.2 (45.3) to Java SE 28 (72).
.CLASS
Oak class file (45.0 to 45.2)Pre-release Java classes whose Code attribute has a one-byte max_stack and max_locals.
.DEX
Dalvik ExecutableAndroid app code: Dalvik bytecode for all classes, with shared tables.
.LUAC
Lua bytecodePrecompiled Lua chunks from luac, tied to one Lua version.
.PYC
Python 1.5 to 2.0 bytecodePython’s bytecode cache, releases 1.5 to 2.0: an 8-byte header and 16-bit code fields.
.PYC
Python 2.1 and 2.2 bytecodePython’s bytecode cache, 2.1 and 2.2: 16-bit code fields and nested-scope variables.
.PYC
Python 2.3 to 2.7 bytecodePython’s bytecode cache, 2.3 to 2.7: an 8-byte header and 32-bit code fields.
.PYC
Python 3.0 to 3.2 bytecodePython’s bytecode cache, 3.0 to 3.2: 8-byte header, keyword-only arguments, Unicode names.
.PYC
Python 3.10 bytecodeco_linetable line numbers and jumps that count instructions: magic 3430 to 3439.
.PYC
Python 3.11 bytecodeOne list of locals, location and exception tables, inline caches: magic 3450 to 3495.
.PYC
Python 3.12 bytecodeInlined comprehensions, LOAD_ATTR method loads, forward-only jumps: magic 3500 to 3531.
.PYC
Python 3.13 bytecodeRenumbered instructions, explicit bool conversion, caches on jumps: magic 3550 to 3571.
.PYC
Python 3.14 bytecodeMarshal version 5 with slice constants, LOAD_SMALL_INT: magic 3600 to 3627.
.PYC
Python 3.15 bytecodeMarshal version 6 with frozen dictionaries, lazy imports: magic 3650 to 3666.
.PYC
Python 3.3 to 3.5 bytecodeCPython 3.3 to 3.5 files: 12-byte header, one-byte and three-byte instructions.
.PYC
Python 3.6 bytecodeCPython 3.6 files: 12-byte header, two-byte instructions, signed line steps.
.PYC
Python 3.7 bytecodeCPython 3.7 files: 16-byte header with flags and an optional source hash.
.PYC
Python 3.8 and 3.9 bytecodeCPython 3.8 and 3.9 files: 16-byte header, positional-only argument count.
.SWF
Compressed Flash movie, zlib (CWS)Everything after the first 8 bytes is a zlib stream; inside is the same movie as an SWF 6 file.
.SWF
Flash movie, SWF 1 to 5 (FWS)The first SWF layout: an uncompressed movie whose text is in the player’s system code page.
.SWF
Flash movie, SWF 6 and later (FWS)Text in UTF-8 and 32-bit clip event flags, uncompressed; the form ActionScript 3 movies also take.
.SWF
Compressed Flash movie, LZMA (ZWS)An LZMA-compressed movie: a compressed length and LZMA properties, then LZMA data.
.WASM
WebAssembly modulePortable bytecode for browsers and runtimes, in numbered sections.
.WASM
WebAssembly componentWebAssembly component model binary: nested modules, typed imports and exports.