Format:Unreal Engine pak file
| Versions | pak version 1-11 (12-15 newer), see body |
|---|---|
| Magic | E1 12 6F 5A (uint32 0x5A6F12E1 inside the footer at the end of the file) |
| Extensions | .pak |
| Endianness | little endian |
| On this wiki | Facts · Code · Notes · Topics |
Archive of Unreal Engine 4 and 5 games (Content/Paks/*.pak): data, then an index, then a footer at the very end of the file that starts (after the optional key GUID and encrypted flag) with the magic E1 12 6F 5A, a version (1 to 11 and later), the index offset and size and the SHA-1 of the index.
Overview
Unreal Engine's UnrealPak writes .pak files that hold .uasset/.uexp/.ubulk packages (Format:Unreal package (uasset)). Games ship pakchunkN-Platform.pak; patches are additional paks with higher priority (name suffix _P). UE 4.26 and later can also ship Format:Unreal IoStore containers. Reading a pak starts at the end of the file.
Source: repak (repak/src/footer.rs, lib.rs) and CUE4Parse (UE4/Pak/Objects/FPakInfo.cs). Reading order from the footer start; each part exists only from the listed version:
| Part | Size | Since |
|---|---|---|
| encryption key GUID | 16 | 7 |
| index encrypted flag | 1 | 4 |
magic 0x5A6F12E1 |
4 | 1 |
| version | 4 | 1 |
| index offset | 8 | 1 |
| index size | 8 | 1 |
| SHA-1 of the index | 20 | 1 |
| frozen index flag | 1 | only version 9 |
| compression method names, 32 bytes each | 4 x 32 (version 8) or 5 x 32 (8B, 9+) | 8 |
Footer sizes follow: 44 bytes up to version 3, 45 for 4-6, 61 for 7, 189 for the 4-name version 8, 221 for 8B, 222 for 9, 221 for 10 and 11 (computed from repak's Version::size). A reader tries each size from the file end and checks the magic. Compression names are zero-padded ASCII such as Zlib, Gzip, Oodle, LZ4, Zstd; before version 8 the methods are fixed (zlib, gzip, oodle).
Versions
repak names: 1 initial, 2 no timestamps, 3 compression and encryption, 4 index encryption, 5 relative chunk offsets, 6 delete records, 7 encryption key GUID, 8 FName based compression (two layouts: 4 names, and 5 names from UE 4.23 per a CUE4Parse comment), 9 frozen index, 10 path hash index, 11 FNV64 bug fix. CUE4Parse adds 12 (UTF-8 pak directory), 13 (sorted directory index), 14 (pakchunk index in the trailer), 15 (encryption method in the trailer).
Unverified (from memory of UE source, not in the repositories): the pak version a given engine release writes - roughly v3 for 4.0-4.2, v4/v5 around 4.3-4.11, v7 4.16-4.21, v8 4.22-4.23, v9 4.25, v10/11 4.26 and 5.x. Use the footer, not the engine version, to choose the parser.
Exact enum with values: Fact:Unreal Engine pak file/enum/pak version enum; footer layout and sizes per version: Fact:Unreal Engine pak file/struct/pak footer layout and size. CUE4Parse (FPakInfo.cs) tries several candidate footer sizes from the end of the file (the 8A size of 221 first, then 189, 61, 222, ...) and accepts the first where the magic matches, so a reader does not need the version in advance. Version 8 comes in two footer layouts (4 or 5 compression names); the u8 compression index is used only in the 4-name layout (repak entry.rs, compression_index_size).
Index
Details below are from repak (repak/src/pak.rs, entry.rs) at the commit linked under Code & repositories; field-level facts: Fact:Unreal Engine pak file/struct/pak v10 index layout, Fact:Unreal Engine pak file/struct/pak v10 secondary indexes, Fact:Unreal Engine pak file/struct/pak encoded entry bits, Fact:Unreal Engine pak file/struct/FPakEntry record, Fact:Unreal Engine pak file/behavior/pak path hash FNV64.
- The footer's index offset and size point at the primary index (AES-encrypted when the footer flag is set). It starts with the FString mount point (for example
../../../) and a record count. - Up to version 9 the primary index is the whole directory: record count times (FString path, FPakEntry). The FPakEntry has offset, compressed and uncompressed size, a compression slot (0 none, n = footer name n-1), SHA-1, compression blocks (u64 start, u64 end, relative to the entry start from version 5) and flags (bit 0 encrypted, bit 1 deleted). Each file's data starts with another copy of the entry (with offset 0), then the data.
- From version 10 the primary index holds the path hash seed, the location of two secondary indexes elsewhere in the file (path hash index: u64 hash and i32 offset per file; full directory index: directory name, then file name and i32 offset per file), and a blob of bit-encoded entries (a 32-bit flag word plus 32 or 64-bit offset and sizes, then block sizes) followed by a short list of ordinary entries for those that do not fit the encoding. A directory entry offset >= 0 points into the blob, a negative value -n selects ordinary entry n-1, and 0x80000000 means deleted.
- Compressed entries are split into blocks (the block size is stored in units of 0x800 in the encoded form); an encrypted entry pads each block to 16 bytes. Unverified: the usual block size is 64 KiB.
- The path hash is FNV over the lowercase UTF-16LE path plus the seed; readers that only list files can ignore the path hash index and read the full directory index.
Unverified: what versions 12 to 15 change in the index (UTF-8 directory, flat sorted directory index, pakchunk index and encryption method in the trailer) is only known from the CUE4Parse enum comments; neither repak nor this page has read a pak of those versions.
Encryption
When the index flag is set the index and the data of encrypted entries use AES-256 with a 32-byte key; the key GUID in the footer (version 7+) says which key. Keys are not in the file and not in this wiki.
Variants
CUE4Parse lists dozens of custom magic values used by games that modified the footer (for example 0xA590ED1E, 0x6B2A56B8, 0x22CE976A, 0x167C2AB4): when the magic is not E1 12 6F 5A at any footer size, check these and whether the footer is obfuscated before concluding the file is not a pak.
Tools
repak (Rust, MIT/Apache-2.0), CUE4Parse (C#, Apache-2.0), FModel, UnrealPak. Next: Library:Unreal Engine.
Code & repositories
- https://github.com/FabianFG/CUE4Parse @
7353666098ece8ed8799fe467a33e7f68b11d688· license: Apache-2.0
C# parser of Unreal Engine 4/5 archives and assets (basis of FModel). Useful without running: UE4/Pak/Objects/FPakInfo.cs, UE4/IO/Objects/FIoStoreTocHeader.cs, FIoChunkId.cs, UE4/Objects/UObject/FPackageFileSummary.cs, UE4/Versions/EGame.cs.
Tested on: source read, not run: source read, not run: read the pak footer, utoc header and package summary code; not built · checked 2026-10-18; last activity 2026-10-17; Note: the latest release ships binaries; the wiki links only the source, never the binaries - https://github.com/trumank/repak @
355b5f62f51959c7cc6dd5a51708646ef483065d· license: Apache-2.0
Rust library and CLI for Unreal pak files. Useful without running: repak/src/lib.rs (versions, footer size) and footer.rs (footer read/write order).
Tested on: source read, not run: source read, not run: read lib.rs and footer.rs; not built · checked 2026-10-18; last activity 2026-02-20; Note: the latest release ships binaries; the wiki links only the source, never the binaries