RAR4 vs RAR5: Compatibility, Checksums and Recovery Differences
Explain version detection, feature differences, old extractor failures and conversion implications.
Detecting the Version: Bytes 0–6
Every RAR file begins with a fixed signature. The seventh byte determines the format version.
- RAR4 starts with
52 61 72 21 1A 07 00(ASCII:Rar!\x1a\x07\x00). - RAR5 starts with
52 61 72 21 1A 07 01(ASCII:Rar!\x1a\x07\x01).
Verify with a hex editor or this command:
head -c 7 yourfile.rar | xxd -p
Output ending in 00 indicates RAR4. Output ending in 01 indicates RAR5. No other bytes participate in version detection. The RAR5 signature was introduced in WinRAR 5.0 (2013) and is documented in the RAR5 technical note.
Structural Differences That Prevent Backward Compatibility
RAR5 is a format rewrite. An extractor built for RAR4 cannot parse RAR5 archives because the internal layout, encryption, and integrity mechanisms differ at the binary level.
Header Structure
RAR4 uses a fixed-offset header: 7 bytes of base data followed by a CRC of the header itself. RAR5 uses a TLV (Type-Length-Value) structure where every block begins with a 2-byte header CRC, then a block type, then block flags. An extractor expecting RAR4's fixed offsets will read file names, sizes, and flags from wrong positions, producing garbage output or immediate rejection.
Encryption
RAR4 encrypts data with AES-128 in CBC mode. RAR5 defaults to AES-256 in CTR mode. An archive encrypted with AES-256 cannot be decrypted by any RAR4-only tool, even if the tool were modified to skip header validation. The cipher and mode are incompatible.
File Data Checksums
RAR4 stores file checksums exclusively as CRC32 (4 bytes). RAR5 supports both CRC32 and BLAKE2sp (32 bytes), selectable at compression time. When BLAKE2 is used, the 32-byte checksum block occupies space that a RAR4 parser interprets as the start of the next file entry. This misalignment cascades into "Unexpected end of archive" or "CRC error in data" failures. The RAR5 specification states that BLAKE2 is not available in RAR4 and that RAR4-based tools cannot validate it.
Recovery Records
RAR4 appends a single Reed-Solomon recovery block after all file entries. RAR5 interleaves recovery blocks with file data and uses a different parity algorithm. A RAR4-aware repair tool operating on a RAR5 archive will either skip the recovery data or overwrite it, rendering repair impossible. The specification describes this as a "new recovery volume scheme."
Failure Modes When Versions Mismatch
Old Extractor on a RAR5 Archive
- Symptoms: "Not a RAR file," "Unexpected end of archive," or "CRC error in data."
- Cause: The extractor reads byte 7 (
0x01) and either rejects the file immediately or attempts RAR4 parsing. The TLV headers produce invalid lengths and offsets. - Diagnosis: Run the hex check above. If byte 7 is
0x01, the extractor must support RAR5. No workaround exists short of replacing the tool.
New Extractor on a RAR4 Archive
WinRAR 5.x and later, 7-Zip 16+, and other current tools read RAR4 without issue. The RAR5 note confirms: "WinRAR 5.0 can unpack archives created by any previous version." No failure occurs, but RAR5-specific features (BLAKE2 checksums, larger dictionaries, 256-bit encryption) are absent.
Conversion from RAR5 to RAR4
Converting requires full extraction and re-compression. The following are permanently lost:
- BLAKE2 checksums become CRC32.
- AES-256 encryption becomes AES-128. The password remains valid, but the cipher strength is downgraded.
- Original recovery records are discarded. New RAR4 recovery records are generated from scratch.
- File comments in RAR5's Unicode format may be truncated if the conversion tool cannot transcode them to RAR4's older encoding.
- File timestamps may shift. RAR5 stores nanosecond precision; RAR4 stores seconds. A tool that mishandles the conversion may reset dates to the DOS epoch (1980-01-01).
How to Check and Convert
Step 1: Identify the Version
Use the hex check above, or run:
file yourfile.rar
Output containing "RAR archive data (v5.0)" indicates RAR5. Output with "RAR archive data" and no version number indicates RAR4.
Step 2: Determine Whether Conversion Is Necessary
- If the target extractor supports RAR5 (WinRAR 5+, 7-Zip 16+, The Unarchiver on macOS), update the tool instead of converting.
- If the target is a legacy device (old NAS firmware, embedded system, vintage OS) with no RAR5 support, convert to RAR4 or to ZIP for broader compatibility.
Step 3: Convert Using a CLI Tool
Using WinRAR's command line or the rar binary on Linux:
rar a -ma archive_rar4.rar extracted_files/
The -ma flag without a version number defaults to RAR4. To explicitly create RAR5, use -ma5. Verify the result:
unrar l archive_rar4.rar
If the listing reports "RAR4" or shows no version identifier, the conversion succeeded.
Step 4: Test Integrity After Conversion
rar t archive_rar4.rar
A clean test means re-compression did not introduce corruption. If the test fails and the original RAR5 archive had recovery records, repair must happen before conversion using a RAR5-aware tool. Once converted, the original parity data is gone.
Limitations of Conversion
- Encryption downgrade: RAR5 uses PBKDF2 with a configurable iteration count for key derivation. RAR4 uses a different, weaker KDF. Re-encrypting with RAR4 reduces brute-force resistance even if the password is unchanged.
- Checksum collision risk: CRC32 is more likely than BLAKE2sp to miss silent data corruption. After conversion, file integrity verification depends entirely on the weaker checksum.
- Unicode file names: RAR5 supports full Unicode including non-BMP characters. RAR4 uses a limited UTF-8 encoding. A filename containing emoji or rare scripts may be mangled or fail to store.
- Solid archive size increase: RAR5 solid compression operates across files with a different algorithm than RAR4 solid. Converting a RAR5 solid archive to RAR4 non-solid (the default) increases output size. Converting with
-senables RAR4 solid mode, which may trigger bugs in older RAR4 extractors.
When Conversion Is Not the Answer
If a RAR5 archive must be opened on a system with only RAR4 support, the options are: update the extractor, convert to RAR4 using the steps above, or convert to ZIP for universal compatibility. Keep the original RAR5 archive until the converted copy passes a full integrity test. The original recovery records and BLAKE2 checksums remain the only reliable verification source for the original data.