ZIP vs 7z vs RAR: Which Archive Format to Use
By Ismail, Founder of Filoshi
ZIP opens everywhere, 7z usually compresses smallest, and RAR needs paid software to create. How they compare on size, encryption and Windows 11 support.
Use ZIP when you're sending files to someone else: every operating system opens it without extra software. Use 7z when the smallest file matters and the person at the other end can open it, which on Windows 11 version 24H2 means anyone. RAR is a proprietary format whose maker sells WinRAR to create it. TAR, usually with gzip or xz on top (.tar.gz, .tar.xz), is the standard on Linux. All four are lossless, so the files that come out are identical to the ones that went in.
How archive compression works
An archive does two jobs: it bundles many files into one, and it usually compresses them. The compression is lossless: it finds repeated patterns and stores them more efficiently, then rebuilds the exact original on extraction. Lossy vs lossless compression explains the difference.
How much an archive shrinks depends far more on what's in it than on the format. Text, spreadsheets, code, databases and uncompressed images or audio (BMP, WAV) shrink a lot. Files that are already compressed, such as JPEG photos, MP4 videos, MP3 music, and DOCX or XLSX documents (which are ZIP packages themselves), barely shrink at all, whichever format you choose. If you're zipping photos to make an email attachment fit, the archive won't help much; file too big to email? covers what does.
That doesn't make archives pointless for media. Bundling still helps: one file is easier to send, download and keep together than three hundred, the folder structure survives the trip, and an archive is a convenient unit for a backup or for encryption with a password.
ZIP: the one everyone can open
ZIP is specified by PKWARE's APPNOTE, which lists DEFLATE as compression method 8, the method most ZIP files use (ZIP APPNOTE). Windows creates and opens ZIP files through File Explorer's compressed folders, and macOS and Linux open them too.
Encryption is ZIP's weak spot in practice. The specification distinguishes the original "traditional PKWARE encryption" from AES encryption, which it files under "strong encryption". If you password-protect a ZIP, choose AES when your tool offers it, and check that the recipient's tool can open AES-encrypted ZIPs.
7z: usually the smallest
7z is the format of 7-Zip, which is free and open source, mostly under the GNU LGPL (7-Zip). Its format page lists LZMA as the default method and LZMA2 as an improved version, "strong AES-256 encryption" with the key derived from your password using SHA-256, solid compression, an open architecture that can add new methods, and support for enormous files (7z format). 7-Zip's own site also claims that, when it writes ZIP and GZIP files, its compression is 2 to 10% better than PKZip and WinZip; that's the publisher's claim, not an independent test.
"Solid" compression treats many files as one stream rather than compressing each separately, so patterns shared between similar files, such as a folder of documents or source code, only need to be stored once.
RAR: proprietary, and paid to create
RAR is the format of WinRAR, made by RARLAB. WinRAR is commercial software with a trial period: its features page says it "can be used absolutely free of charge for 40 days", and it lists splitting archives into separate volumes and 256-bit AES encryption among its features (WinRAR features). Opening RAR files is widely supported, including by 7-Zip and, since version 24H2, by Windows 11 itself. Creating them needs WinRAR.
The practical advice: open RAR files when you receive them, but don't create new ones unless the recipient specifically asks. ZIP and 7z do the same jobs in formats anyone can create for free.
TAR, .tar.gz and .tar.xz
TAR comes from Unix. On its own it only bundles files, keeping Unix permissions and folder structure, and doesn't compress. Compression is added as a second layer: gzip (RFC 1952) for .tar.gz or .tgz, bzip2 for .tar.bz2, and xz for .tar.xz. You'll meet them in software downloads, Linux backups and developer tools. Windows 11 24H2 opens TAR archives, and the two-layer extension just means "a TAR inside a compressed file".
What Windows 11 does on its own
Microsoft's support page states that Windows 11 version 24H2 supports the ZIP, RAR, 7z and TAR archive formats, but not operations on encrypted archive files, for which it points to tools such as 7-Zip or WinRAR (Microsoft: zip and unzip files). On earlier versions of Windows, ZIP is the built-in format and anything else needs an app. Opening RAR, 7z and TAR files on Windows 11 walks through it step by step.
Side by side
| ZIP | 7z | RAR | TAR + gzip/xz | |
|---|---|---|---|---|
| Opens without extra software | Windows, macOS, Linux | Windows 11 24H2 | Windows 11 24H2 | Linux, macOS, Windows 11 24H2 |
| Create for free | Yes | Yes (7-Zip) | No (WinRAR, trial) | Yes |
| Typical size | Larger | Usually smallest | Varies | Varies with the compressor |
| Strong encryption | AES, if your tool supports it | AES-256 | AES-256 | Not built in |
| Open specification | Yes (APPNOTE) | Yes (open architecture) | Proprietary | Yes |
| Best for | Sharing with anyone | Smallest archives, backups | Opening what you receive | Linux and developer files |
No benchmark numbers here on purpose: compression results depend so much on the files that a single figure would mislead. Try your own folder in two formats and compare.
Which one to choose
- Emailing a folder to a client, a teacher or a relative: ZIP.
- Archiving your own documents or backups: 7z, or ZIP if long-term compatibility matters more than size.
- Something confidential: 7z with AES-256, or AES-encrypted ZIP, with the password sent separately. Windows' built-in support won't open encrypted archives, so the recipient needs 7-Zip or similar.
- Sending to a Linux user or a server: .tar.gz or .tar.xz.
- You received a RAR: open it, and if you need to pass the contents on, repack them as ZIP.
Archives are also part of keeping what you share under control: the files inside can carry their own hidden metadata. The hidden data in your files covers what to strip before you bundle them.
Before you send an archive
- Open it yourself. Double-click the archive and check that every file and folder is there.
- Extract a test copy to a different folder and open a few files, especially the important ones.
- Check the size against where it's going: an email limit, an upload form, a USB stick.
- Use one top-level folder inside the archive, named after the project, so the recipient's extraction doesn't scatter files across their Downloads folder.
- Avoid special characters in file names if the recipient might use a different operating system.
- If it's encrypted, confirm the recipient has a tool that opens that encryption, and send the password by a different channel.
Repacking an archive in another format
Sometimes the format is the only problem: a .7z for someone on old Windows, a .tar.gz from a developer for a colleague who only knows ZIP. Filoshi repacks archives on your PC: it unpacks the archive and packs the same files into the new format, without changing the files inside. Only the archive's compression changes, so the new archive may be bigger or smaller. ZIP to 7z, 7z to ZIP, TAR to ZIP and ZIP to TAR all passed its automated test matrix, along with the GZ, BZ2 and XZ variants, using the 7-Zip engine built into the app.
The honest limits: RAR is listed as an input in the app but isn't yet covered by a test file, and the same goes for CAB, ISO, RPM, LZH, ARJ and LZMA. Filoshi can't create RAR files at all, and password-protected archives aren't something I've verified it handles, so use 7-Zip for those.
I make Filoshi, so weigh what I say about it accordingly. The facts about formats and Windows are linked to their sources.
Frequently asked questions
Is 7z better than ZIP?
For size, usually yes: 7z's LZMA and LZMA2 methods and solid compression tend to produce smaller archives, especially for many similar files. For compatibility, ZIP wins, since every system opens it without extra software. Since Windows 11 24H2 opens 7z natively, 7z is a fine choice for Windows users; for everyone else, ZIP is the safe one.
Is a RAR file safe to open?
The format itself is just an archive, like ZIP. The risk is what's inside: an archive from an unknown sender can contain malware, often an executable disguised with a document-like name. Scan it with Microsoft Defender before extracting, don't run programs from it unless you trust the source, and be wary of password-protected archives from strangers.
Does zipping reduce the size of videos and photos?
Hardly. JPEG photos, MP4 videos and MP3 files are already compressed, so a ZIP or 7z of them is about the same size as the originals. To make them smaller, change the files themselves: lower the photo quality or resolution, or re-encode the video at a lower resolution. Archives shrink text, documents and uncompressed formats much better.
Which archive format is the most secure?
7z and RAR both offer AES-256 encryption, and ZIP can use AES with tools that support it, which is far stronger than ZIP's original "traditional" encryption. The password matters as much as the format: use a long one and send it separately from the file. Note that Windows' built-in archive support doesn't open encrypted archives.
iPhone Photos on a Windows PC: HEIC, Live Photos, Videos
Next →The Hidden Data in Your Files, and How to Remove It
Ready to convert files privately?
1,841 tested conversions. No uploads. No accounts. Runs entirely on your machine.
Get Filoshi · $29