What is a RAR File?
A RAR file is a compressed archive created with WinRAR or the rar command-line tool, both developed by Eugene Roshal. It can hold many files and folders and usually compresses slightly better than ZIP. RAR also supports solid compression, AES encryption, recovery records that can repair a damaged archive, and archives split into several volumes (named .part1.rar, .part2.rar, or .rar, .r00, .r01 in older versions).
Creating RAR files requires WinRAR, but many free tools can extract them, including 7-Zip, PeaZip, The Unarchiver and unrar. Newer WinRAR versions can also create the RAR5 format; these samples use the older RAR 4 format, which almost every extraction tool supports.
Download RAR Sample Files
The three RAR samples below contain the same files as our ZIP and TAR samples, so you can compare the formats directly.
RAR Sample File Details
| Sample | Size | Contents |
|---|---|---|
| Sample1.RAR | 3.71 MB | 1 MP3 audio file |
| Sample2.RAR | 19.7 KB | 2 XLSX spreadsheets |
| Sample3.RAR | 3.40 MB | 4 files with a .jpe extension (one-page PDF documents, not JPEG images) |
All three are RAR 4 archives (signature Rar! 1A 07 00) created on Unix with normal compression. They are not solid, not encrypted and not split into volumes.
What You Can Test With These RAR Files
- Extraction support: apps, libraries and CI scripts that need to open RAR archives.
- Upload filters: forms that should accept or block archives (MIME type
application/vnd.rar). - Archive scanners: antivirus and data-loss tools that inspect files inside archives.
- File-type detection: identifying RAR by its signature rather than its extension.
- Compression comparisons: the same files are available as ZIP and TAR.
How to Extract a RAR File
# List the contents without extracting
unrar l sample-1.rar
# Extract with folder paths
unrar x sample-1.rar
# Or use 7-Zip
7z x sample-1.rar
On Windows, open RAR files with WinRAR or 7-Zip. Windows 11 can also open them directly in File Explorer since its 2023 updates.
RAR vs ZIP vs TAR: The Same Files Compared
| Contents (original size) | ZIP | RAR | TGZ | TAR (no compression) |
|---|---|---|---|---|
| 1 MP3 file (3,902,902 bytes) | 3,893,944 bytes | 3,892,989 bytes | 3,888,579 bytes | 3,911,680 bytes |
| 2 XLSX spreadsheets (25,365 bytes) | 20,294 bytes | 20,141 bytes | 16,824 bytes | 30,720 bytes |
| 4 .jpe files (3,701,429 bytes) | 3,578,906 bytes | 3,561,848 bytes | 3,578,399 bytes | 3,706,880 bytes |
TGZ makes the smallest archive for the MP3 and the spreadsheets because gzip compresses all files as one stream, while ZIP and these RAR samples compress each file separately. RAR wins for the images. The differences are small for MP3 and JPEG data, which is already compressed. TAR does not compress at all and pads its output to full 10 KB records, which is why 25 KB of spreadsheets becomes a 30 KB TAR file.






