TGZ File Format (.tgz)
A TGZ file is the result of running tar to bundle files first and then gzip to compress that single resulting stream, packaged under one extension because DOS-era 8.3 filenames had no room for the two dots in .tar.gz.
TGZ at a glance#
| Full name | gzip compressed tarball |
|---|---|
| File extension | .tgz |
| Category | Archives |
| MIME types | application/x-compressed-tar |
| Other extensions | .tar.gz |
| Compression | Lossless |
| FileFlip support | FileFlip reads and writes this format |
What a .tgz file can hold#
These are the things a TGZ file either supports or does not, and they are what decides whether a conversion keeps everything or quietly drops something.
| Embedded metadata | Yes |
|---|---|
| Streaming | Yes |
Strengths and limitations of TGZ#
What TGZ does well
- Combines tar's ownership and permission metadata with gzip's fast, near-universal decompression in one step
- One command both creates and compresses the archive, which is why it's the default packaging for source releases
Where TGZ falls short
- Solid-stream compression means extracting one file requires decompressing everything before it in the archive, unlike ZIP
- No index, so listing or extracting from a large tgz means reading it from front to back
Use TGZ for a Unix-style package or source release, where tar's metadata plus gzip's speed is the traditional, most widely supported combination.
Convert TGZ to TXZ when the smallest possible archive size matters more than compression speed.
How to open a .tgz file#
A .tgz file opens in the programs below, grouped by the platform you are on. If you would rather not install anything, FileFlip converts TGZ into a format your machine already opens, and it does it in the browser tab rather than on a server.
| Platform | Programs that open it |
|---|---|
| Windows | 7-Zip, WinRAR |
| macOS | Archive Utility |
| Linux | Archive Manager (File Roller), tar (terminal) |
| Web | FileFlip |
TGZ questions people ask#
What's the difference between .tar.gz and .tgz?
Nothing; a TGZ file is a tar archive compressed with gzip, exactly the same content as a .tar.gz file. The .tgz spelling exists because older filesystems, notably DOS's 8.3 naming, couldn't handle a filename with two dots and a three-letter extension after each.
Can I open a specific file inside a TGZ without extracting everything?
Most tar tools can list or pull one named file from a TGZ, but they still have to decompress the gzip stream sequentially up to that point first, since there's no index. On a large archive this is slower than the same operation on a ZIP, where each file is compressed independently.
Why do open-source projects distribute source code as .tgz?
A TGZ keeps Unix file permissions and directory structure intact through tar while gzip compresses the whole thing down quickly, and gzip decompresses on essentially any system without extra tooling. That combination has been the default source-release format since long before xz or bzip2 existed.
Converting TGZ files#
Convert TGZ to another format
Convert another format to TGZ
Every conversion runs inside your browser. The file is read from your disk, the work happens on your own machine, and nothing is uploaded. How FileFlip works names the engine behind each family and how to verify that for yourself.