Someone sends you a download link, and the file ends in .rar, .7z or .tar.gz. On some machines it opens with a double-click. On others you get a blank icon and an offer to search the store for an app. All of these are archives, files that bundle other files together, but they made different choices, and those choices decide where they open.
ZIP: the one that opens everywhere
ZIP dates from 1989 and its format is openly documented, which is why Windows, macOS, Linux, Android and iOS all open it without extra software. It compresses each file separately using the Deflate method. That independence is convenient, because you can pull one file out of a large archive without decompressing the rest, but it also limits how small the archive can get, because ZIP never notices that two files contain similar data.
RAR and 7z: smaller, but need software
RAR is a proprietary format from the makers of WinRAR. Extracting RAR files is widely supported by free tools, but creating them requires licensed software. 7z is the native format of 7-Zip, a free and open-source archiver, and normally uses the LZMA family of compression methods.
Both commonly use solid compression: many files are compressed as one continuous stream, so repetition across files is found and stored once. For a folder of source code, documents or game assets, that can make the archive noticeably smaller than a ZIP. The cost is that support is not universal. Recent versions of Windows 11 added built-in reading of RAR and 7z, but older Windows, many Macs and most phones still need a separate app.
TAR.GZ: two steps in one name
.tar.gz describes two separate steps, and the name lists them in order. TAR, the tape archive format from early Unix, simply concatenates files with a 512-byte header before each one, recording its name, size and permissions. It does no compression at all. The second extension says what compressed the whole bundle afterwards: .gz for gzip, .bz2 for bzip2, .xz for XZ. A .tgz file is the same thing with a shorter name.
Because the whole bundle is compressed as one stream, TAR.GZ gets the same cross-file benefit as solid RAR and 7z. It is the standard on Linux servers and in software distribution, and it preserves Unix file permissions, which ZIP handles inconsistently.
Turning anything into a ZIP
If you received an archive the recipient's computer cannot open, or you just want a ZIP you can open anywhere, the conversion is extract-then-repack: every file is unpacked, then packed again in the new format. The files themselves come out byte-for-byte identical; only the wrapper changes, with folder structure and names preserved.
Here, RAR to ZIP, 7z to ZIP and TAR to ZIP, which also handles .tgz, .tar.bz2 and .tar.xz, do this in the browser. Reading uses libarchive, the open-source library behind the bsdtar command and the archive support in macOS, compiled to WebAssembly. The ZIP is often a little larger than the original, which is the expected cost of losing solid compression.
Going the other way is useful too. When you are uploading files to a Linux server or packaging something for a developer, ZIP to TAR.GZ repacks a ZIP, 7z or RAR archive into the format they expect.
Which to use when you are the sender
Send ZIP to people, because everyone can open it. Use TAR.GZ for servers and for anything where file permissions matter. Reach for 7z when size matters and you know the recipient has 7-Zip. And remember that compressing photos, videos and PDFs barely shrinks them in any format, because those files are already compressed; the archive is useful for bundling them into one download, not for saving space.