Tar Files in Plain English
What a tar archive is, how the gzip layer differs, and a careful way for non-developers to unpack one.
A tar file is a bundle. The name is old, from an era of tape, but the idea is current: put many files in one stream and keep their names. By itself, tar usually does not compress. It only collects. When you see tar.gz or tgz, someone collected the files and then compressed the collection. You unpack the compression, then you unpack the bundle, though a good tool does both clicks for you.
Two steps wearing one name
Think of a folder placed in a box, and the box then squeezed. The .tar ending is the box. The .gz ending is the squeeze, a gzip layer. A file named notes.tar.gz has both. A file named notes.tar has the box without the squeeze. People call both of them tarballs in technical conversation. You can call them archives and still be understood.
This is different from ZIP, which commonly compresses each file as it stores the package. ZIP files are what most class assignments expect. Tar shows up when you download source code, data from a research group, or a backup made on a Unix-style system.
Opening one without a scavenger hunt
macOS often opens these with a double-click. Current Windows systems can handle many tar archives too, either in the file manager or with a small archive tool you already trust. If a double-click shows a single inner file that still ends in .tar, you have only removed the gzip layer. Extract once more. That second step surprises people, and it is the same idea as a zip inside a zip, even though the formats differ.
Extract into an empty folder. Tar archives can contain many paths, and pouring them onto a desktop makes a mess that is hard to distinguish from files you already had.
What to watch for inside
A tar archive can store paths, not only loose files. After extracting, you should see a project folder, not a rewrite of your documents folder. If a tool asks to write outside the folder you chose, cancel and pick another method. Archives are not supposed to redecorate the rest of your disk. This is a general caution with any format, and it matters here because tar downloads are often large project trees.
Look for a read-me file at the top of the extracted folder before you move anything into your own folder structure. The read-me is part of the delivery. The archive was only the envelope.
Compression choices around tar
You may also see tar.bz2 or tar.xz. They are the same bundle idea with a different squeeze. The practical difference is which tool opens them and how long that takes. You do not need to pick a favorite. Use a maintained archive utility if the system does not open the file, and avoid a website that says it will convert the archive if the contents are private. Checking a download still applies to the tar file itself. A familiar extension is not a character reference.
If you only needed one document from a huge tar.gz, you still may have to extract much more than that document. Plan disk space before you start. Solid archives have a related cost: convenience of packing versus convenience of pulling one item out.
When you need to send files back
If a person specifically asked for tar.gz, a proper tool can create one. If they did not, send ZIP. Do not rename a ZIP to tar.gz. The bytes will not match the name, which is the same failure described in when a file extension does not match. Say in your note which tool you used if the recipient is on a different system.
Frequently asked questions
Is tar safer than ZIP? Neither is a security badge. Both can contain many files, including ones you did not expect. Trust depends on the source, not the extension.
Why is there a file called tar inside? You probably peeled off gzip and stopped. Extract the remaining tar. The real project is inside that second layer.
Can I turn tar.gz into a normal folder and forget the archive? Yes, once you have extracted it and checked the contents. Keep the archive until you are sure the folder is complete, then file the folder as the working copy.