Introduction
This is the RAR format used from RAR 1.5 until WinRAR 4.x, and still written by later versions when the old format is chosen. Most RAR files from the 1990s and 2000s use it. Its compression changed over the years (RAR 1.5, 2.0 and 2.9 each brought a new method), but the block layout stayed the same. Encrypted archives use AES-128 from RAR 3.0 on. It was replaced by RAR 5.0 in 2013.
Multi-volume archives were first named name.rar, name.r00,
name.r01 and so on; RAR 3.0 added the name.part1.rar style.
Structure
The archive is a series of blocks, and even the signature is laid out as one. Every block starts with the same 7-byte header. Numbers are little-endian.
0HEAD_CRC low 16 bits of the CRC-32 of the header from HEAD_TYPE on2 bytes2HEAD_TYPE the block type1 byte3HEAD_FLAGS; bit8000means data follows the header2 bytes5HEAD_SIZE the size of the whole header2 bytes7Type-specific fields, starting with the data size when there is data, then the datavaries
The main block types are 72 for the marker (the signature
Rar! 1A 07 00), 73 for the archive header,
74 for a file header, 7A for a subblock such as a comment or
recovery record, and 7B for the end of the archive. A file header gives the
packed and unpacked sizes, the host operating system, the file’s CRC-32, its DOS date and
time, the version needed to extract it, the method (30 for stored up to
35 for best compression), the attributes and the name; the compressed data
follows the header. A self-extracting archive has a program in front of the
signature. Every block, field and flag is on the
blocks and headers page.
Not described
Re-checked on 2026-11-13: the block headers, the Unicode name encoding (UnRAR’s encname.cpp) and the
type 78 recovery header (arcread.cpp, headers.hpp) match the pages; the block layouts are
otherwise as UnRAR and the RAR 3.93 technical note give them. The RAR 1.3 and 1.4 header, which the explorer now reads, is
on the blocks page; updated 2026-11-19.
Known, not yet covered
- Reference: the compression methods (RAR 1.5, 2.0, 2.9 and PPMd variants) and the encryption,
which are implemented in UnRAR’s
unpack*.cppandcrypt*.cpp; the pages give the method and version codes only. - Viewer: the compression is decoded (UnRAR’s
unpack15.cpp,unpack20.cpp,unpack30.cpp,model.cppandrarvm.cpp): RAR 1.5, RAR 2.0 with its audio blocks, and RAR 2.9 to 4.x with Huffman blocks, PPMd variant H blocks and the VM filters, in solid runs, with each member checked against its CRC-32. Of the VM filters the six that RAR writes are run (they are recognised by the length and CRC-32 of the program, as UnRAR does); any other program is shown disassembled and labelled not run, and its member is not opened. Members over 64 MB are read in windows without checkpoints, so a read back from the end decodes again from the start. No real archive with a RAR 2.0 audio block of more than two channels, or with the ITANIUM or RGB filter, was found (the AUDIO filter has the junrar stereo archive): those routines are checked with forward coders written here from UnRAR’srarvm.cppandunpack20.cpp(1 to 4 audio channels in RAR 2.0, 1 to 8 in the AUDIO filter, RGB and ITANIUM at several parameters), whose output the decoder must turn back into the original bytes; that shows agreement with an independent transcription of the source, not with RAR’s own output. Unpack version 36 is decoded as 29. - Viewer: the “Password” box decrypts encrypted members and, with main flag
0x80, encrypted headers (an 8-byte salt before each header): AES-128-CBC with the SHA-1 key derivation ofcrypt3.cppfor unpack versions 29 and 36, the RAR 2.0 block cipher for 20 and 26, and the byte stream ciphers of RAR 1.5 and 1.3 for 15 and 13 (crypt1.cpp,crypt2.cpp). Without a password only the main header can be read and an encrypted member is listed with the reason and not opened. There is no password check value in these archives: a wrong password shows as a header CRC-16 that does not match (encrypted headers) or a member CRC-32 that does not. Checked on archives built for the test with Node’s AES and SHA-1 (versions 29, stored and compressed, with encrypted headers) and with forward ciphers written from UnRAR’s source (13, 15, 20, 26); no real archive was opened with a password, and the part of UnRAR’s SHA-1 that rewrites its input buffer (passwords of about 60 characters and more) is not checked against an archive. - Viewer: volumes (
name.part1.rar…, orname.rar,name.r00…) are joined when the files are handed over together, and a member split over volumes opens whole, checked against the CRC-32 in its last part. The order comes from the names, not from the volume numbers in the headers. A volume opened alone lists a member that continues elsewhere and does not open it. - Viewer: the old-style blocks (types
75to79) are shown with their basic header and, for the comment block, its fields. The extended time fields (flag0x1000) are read as the blocks page and UnRAR describe them, and the modification time of each member that has one (the Modified column) was checked against the Python rarfile project’s own listings of its test archives: 26 members of 10 archives, 18 of them with a sub-second part, all equal to the nanosecond. The creation and access times are read and shown in the tree but have no listing to be compared with, and it is not known that any of those archives sets the “add a second” bit. - Viewer: the RAR 1.3 and 1.4 format (marker
RE~^) is read, with the compressed members decoded (the RAR 1.5 coder) and the 16-bit checksum checked; it was checked against one solid archive, an empty one and two with a password, and a split over volumes only against an archive the site built.
Unknown
- Reference: the contents of the authenticity blocks (types
76,79) and the recovery record algorithm: no public description exists.
Variants
- RAR 5.0 archive (RAR5) – WinRAR’s current archive: CRC-32 block headers with variable-length numbers
- RAR 1.5 to 4.x archive (RAR4) – the older RAR format: blocks with a fixed 7-byte header and 16-bit CRC
Links
Software
- WinRAR – the archiver that makes RAR files, and still writes this format on request (Windows, macOS, Linux)
- 7-Zip – free archiver that extracts RAR files (Windows)
- The Unarchiver – free extractor for many formats (macOS)
- PeaZip – free archiver that extracts RAR files (Windows, macOS, Linux)
Developers
- UnRAR source – RARLAB’s extraction code (C++)
- libarchive – reads RAR 4 archives among many formats (C)
- rarfile – reads archives with the help of an external extractor (Python)