What to Know
- A TGZ or GZ file is a GZIP compressed TAR archive.
- Open one with 7-Zip or PeaZip.
- Convert to other archive formats with Convertio.
This article explains what TGZ, GZ, and TAR.GZ are, what they're used for, and how to open one. We'll also look at how to convert the files from inside the archive (or the whole archive itself) into a different format.
What Are TGZ, GZ, & TAR.GZ Files?
A file with the TGZ or GZ file extension is a Gzip-compressed TAR archive. They are called tarballs and sometimes use a “double” extension like TAR.GZ, but are usually shortened to TGZ or GZ.
Files of this type are typically only seen with software installers on Unix-based operating systems like macOS, but they're also sometimes used for regular data archiving purposes. This means that, even if you're a Windows user, you may encounter and want to extract data from these kinds of files.
How to Open TGZ and GZ Files
TGZ and GZ files can be opened with most popular zip/unzip programs, like 7-Zip or PeaZip. To do this online, you can use B1 Online Archiver.
Since TAR files don't have natural compression capabilities, you'll sometimes see them compressed with archive formats that do support compression, which is how they end up with the TAR.GZ, GZ, or TGZ file extension.
Some compressed TAR files may look something like Data.tar.gz, with another extension or two in addition to TAR. This is because, as described above, the files/folders were first archived using TAR (creating Data.tar) and then compressed with GNU Zip compression. A similar naming structure would happen if the TAR file were compressed with BZIP2 compression, creating Data.tar.bz2.
In these types of cases, extracting the GZ, TGZ, or BZ2 file will show the TAR file. This means after opening the initial archive, you have to then open the TAR file. The same process takes place no matter how many archive files are stored in other archive files—just keep extracting them until you get to the actual file contents.
For example, in a program like 7-Zip, when you open the Data.tar.gz (or .TGZ) file, you'll see something like Data.tar. Inside the Data.tar file is where the actual files that make up the TAR are located (like music files, documents, software, etc.).
TAR files compressed with GNU Zip compression can be opened in Unix systems without 7-Zip or any other software, simply by using the command as shown below. In this example, file.tar.gz is the compressed TAR file name. This command performs both the decompression and then the expansion of the TAR archive.
gunzip -c file.tar.gz | tar -xvf –
TAR files that have been compressed with the Unix compress command can be opened by replacing the 'gunzip' command from above with the 'uncompress' command.
How to Convert TGZ and GZ Files
You’re probably not after an actual TGZ or GZ archive converter, but instead, are wanting a way to convert one or more files from inside the archive into a new format. For example, if your TGZ or GZ file has a PNG image inside, you may want to convert it to a different image format.
The way to do this is to use the information from above to extract the file out of the TGZ/GZ/TAR.GZ file and then use a free file converter on whatever data inside you want in another format.
However, if you do want to convert your GZ or TGZ file to another archive format, like ZIP, RAR, or CPIO, you should be able to use the free online Convertio file converter. You have to upload the compressed TAR file (e.g., whatever.tgz) to that website and then download the converted archive file before you can use it.
ArcConvert is like Convertio but is better if you have a large archive because you don’t have to wait for it to upload before the conversion starts—the program is installable like a regular application.
TAR.GZ files can also be converted to ISO using the AnyToISO software.
GZIP compression is also used on CPIO files to create CPGZ files.
Still Can't Open It?
Lots of files use a similar file extension, but that doesn't mean their formats are related or that the same software is able to open or convert the file. This confusion might lead you to try to open an incompatible file with one of the programs on your computer.
For example, TG might at first look related to the formats explained above. In reality, opening one with an archive tool probably wouldn't work since TG files are actually documents used with TuxGuitar.
ZGR is another that could be confused for a TGZ file. That extension belongs to BeatSlicer Groove files, and the file opens with a program called FL Studio.