What is TGZ?

TGZ (tar.gz) is a gzip-compressed tar archive widely used on Unix and Linux for distributing source code, backups, and software packages.

Free online file converter tool. Works in Chrome Firefox Safari Edge Opera and other modern browsers on Windows macOS Linux Android and iOS. No software installation or sign-up required. All conversions run directly in your browser, so your files never leave your device. Free to use with no account needed.

Archive

What is TGZ?

A gzip-compressed tar archive that bundles files and then shrinks them in one stream.

Last updated:

Year Created1992
CompressionArchive + compression
Primary UseSource and software distribution

What is TGZ?

TGZ, also written as .tar.gz, is a compound format in which files are first combined into a single tar archive and that archive is then compressed with gzip. The result is one file that preserves Unix file structure and metadata while reducing size.

The two stages are separate: tar handles bundling and metadata such as permissions and timestamps, while gzip applies DEFLATE compression to the whole tarball. The .tgz extension is simply a shorthand for .tar.gz, and the file is decompressed by gunzip and then unpacked by tar.

How TGZ Works

A .tgz file is simply a .tar.gz under a shorter name, a convenience spelling for systems or people who prefer a single three-letter extension. It is the product of two separate steps stacked together: first tar bundles a set of files and directories into one uncompressed archive, then gzip compresses that whole archive into a single stream. Understanding it means understanding that pairing.

The tar stage handles packaging. It walks the files you give it and writes each one preceded by a header block recording its name, size, permissions, owner, and timestamp, preserving the full Unix metadata so the tree can be restored exactly. At this point nothing is smaller; tar only concatenates.

The gzip stage then handles compression, running the entire tar stream through the DEFLATE algorithm (LZ77 dictionary matching plus Huffman coding) to remove redundancy. Because gzip sees the whole concatenated archive at once, it can exploit similarities between the bundled files, which is why a .tgz of many small related files often compresses better than compressing each one separately.

One practical consequence of this order matters: to read a single file you must first gunzip the stream and then scan the tar for the entry, since tar has no index and gzip must be decoded from the start. In everyday use a single command such as tar xzf archive.tgz does the ungzip and untar together, hiding the two-step nature entirely.

History and Standardization

The .tgz spelling arose for a practical reason. Older filesystems, especially DOS and early Windows with their eight-plus-three naming limits, could not comfortably hold a compound extension like .tar.gz, so the contraction .tgz became the portable way to name the same thing.

Both underlying formats are long-standing open standards: tar's layout is defined by POSIX (the ustar and pax formats), and gzip is specified in RFC 1952 with its DEFLATE core in RFC 1951. Because .tgz is just those two well-defined pieces combined, every tar and gzip implementation reads it, and no separate specification is needed.

The pairing became the default distribution format across the Unix world for source code, backups, and general file transfer. It remains extremely common today, and any modern archive utility on any platform recognises both the .tar.gz and .tgz spellings interchangeably.

TGZ Compared to tar.bz2, tar.xz, and ZIP

Compared to the other tar pairings, .tgz is the fast, universal option. Swapping gzip for bzip2 (.tar.bz2) or XZ (.tar.xz) yields a smaller file but slower compression and, for bzip2, slower decompression. .tgz wins when speed and maximum compatibility matter more than the last few percent of size.

Against ZIP, the difference is the same as tar versus ZIP generally. ZIP compresses each file individually and keeps a central index for fast single-file access, while a .tgz compresses the whole bundle as one stream. That gives .tgz better cross-file compression and full preservation of Unix permissions, at the cost of not being able to pull out one file without processing the archive up to it.

Because a .tgz is nothing more than tar plus gzip, it inherits both of their traits: tar's faithful metadata handling and streaming design, and gzip's speed and universal support. That combination is why it stayed the everyday default for shipping and archiving files on Unix-like systems for decades.

MKV Technical Specifications

Developertar by Unix/GNU; gzip by Jean-loup Gailly and Mark Adler[1]
File Extension.tgz, .tar.gz[1]
MIME Typeapplication/gzip[1]
Releasedgzip released 1992[1]
TypeGzip-compressed tar archive[1]

TGZ vs Other Archive Formats

FeatureTGZZIPTAR
StructureTAR + gzip[2]Single containerBundle only
Compressiongzip / DEFLATE[1]DEFLATENone
Per-file accessNo[3]YesYes
Preserves Unix metadataYesLimitedYes
Best forUnix source/release tarballsCross-platform sharingBundling only

TGZ compresses an entire TAR stream as a whole, so unlike ZIP it cannot extract a single file without decompressing the archive.

Advantages & Disadvantages

Advantages

Preserves Unix metadata

The tar layer keeps permissions, ownership, symlinks, and timestamps intact through compression.

Solid compression

Because gzip compresses the entire tarball as one stream, cross-file redundancy improves the overall ratio.

Ubiquitous tooling

tar and gzip are standard on virtually every Unix and Linux system, requiring no extra software.

Streamable

Archives can be created and extracted on the fly through pipes, ideal for backups and network transfer.

Disadvantages

No random access

Because the whole archive is a single compressed stream, individual files cannot be extracted without reading from the start.

No built-in encryption

Neither tar nor gzip provides encryption, so security must be added with separate tools.

Single-stream fragility

Corruption early in the gzip stream can make the remainder of the archive unrecoverable.

Common Use Cases

TGZ is a default choice for packaging and moving files in Unix-like environments.

Source code distribution

Open-source projects commonly release source tarballs as .tar.gz downloads.

Backups

System administrators archive directory trees into compressed tarballs for storage and transfer.

Software packaging

Many Unix software bundles and language package ecosystems ship artifacts as tgz files.

Convert TGZ Files Free

Use our free online archive converter to convert TGZ and other formats - no signup, no watermarks.

Try Archive Converter Free

How to open a TGZ file

TGZ files, which are compressed tar archives, can be handled by a variety of software tools that fall into several categories: professional applications, free and open-source tools, browser-based utilities, and built-in system tools. Professional applications often provide advanced features for handling TGZ files, making them suitable for businesses and developers. Free and open-source tools are ideal for users seeking cost-effective solutions without sacrificing functionality, while browser-based utilities offer convenience for quick tasks without installation. Built-in system tools are useful for users who prefer native solutions on their operating systems.

When choosing software for TGZ files, several decision factors come into play, including feature fidelity, the distinction between editing and viewing capabilities, cost models, and platform compatibility. Users should consider whether they need to extract, view, or edit the contents of TGZ files, as some tools excel in specific areas. Additionally, the cost model can influence the choice, especially for users on a budget. In some cases, converting TGZ files to other formats may be more beneficial, depending on the intended use of the files.

WinRAR 6.20

Windows, macOS, LinuxOne-time $39.00

WinRAR is a powerful archive manager that supports TGZ files among many other formats. It allows users to extract and create TGZ archives with high fidelity, ensuring that file integrity is maintained during the process.

Key features
  • Multi-format archive support including TGZ
  • High compression ratio for archives
  • Password protection for secure files
  • Repair damaged archives functionality
  • Batch extraction of multiple archives
Strengths
  • Robust compression and extraction capabilities
  • User-friendly interface with advanced options
  • Widely trusted and established software
Limitations
  • Paid software with limited trial period
  • Not open-source, which may deter some users

Exports to: ZIP, RAR, TAR, 7Z, ISO

Best for: WinRAR is ideal for users needing a reliable and feature-rich tool for managing TGZ files, especially in a professional setting.

Visit WinRAR →

7-Zip 21.07

Windows, macOS (via unofficial ports), LinuxFree (GPL)

7-Zip is a free and open-source file archiver that provides excellent support for TGZ files. It allows users to extract and create TGZ archives while maintaining high fidelity and offers a simple interface for easy navigation.

Key features
  • High compression ratio using LZMA algorithm
  • Support for a wide range of archive formats
  • Integration with Windows Explorer for convenience
  • Strong AES-256 encryption for security
  • Command-line interface for advanced users
Strengths
  • Completely free and open-source software
  • Highly efficient compression algorithms
  • Lightweight and fast performance
Limitations
  • Limited support for advanced editing features
  • User interface may seem basic to some

Exports to: ZIP, TAR, WIM, EXE, GZ

Best for: 7-Zip is perfect for users looking for a free, efficient, and straightforward tool to work with TGZ files.

Visit 7-Zip →

PeaZip 8.6.0

Windows, LinuxFree (GPL)

PeaZip is a free file archiver that supports TGZ files and offers a user-friendly interface with a variety of features. It allows users to extract and create TGZ archives, focusing on usability and flexibility.

Key features
  • Multi-format support including TGZ and TAR
  • Secure file deletion and encryption options
  • Integrated file manager for easy navigation
  • Batch processing for multiple files
  • Customizable user interface and themes
Strengths
  • Open-source with no hidden costs
  • Rich feature set for advanced users
  • Cross-platform compatibility
Limitations
  • Performance can lag with large files
  • Less known than other archivers

Exports to: ZIP, TAR, 7Z, ARC, GZ

Best for: PeaZip is suitable for users who value a feature-rich, open-source tool for managing TGZ files with an emphasis on usability.

Visit PeaZip →

The Unarchiver 4.3.0

macOSFree

The Unarchiver is a free extraction tool for macOS that supports TGZ files among many other formats. It focuses on simplicity and ease of use, allowing users to quickly extract the contents of TGZ archives without complex settings.

Key features
  • Support for a wide variety of archive formats
  • Easy drag-and-drop extraction
  • Integration with macOS Finder
  • Automatic file association for archives
  • Supports Unicode filenames for better compatibility
Strengths
  • Simple and intuitive interface for macOS users
  • Fast extraction speeds
  • Lightweight and free to use
Limitations
  • Limited editing capabilities for TGZ files
  • Only available for macOS

Exports to: N/A

Best for: The Unarchiver is ideal for macOS users who need a straightforward and efficient tool for extracting TGZ files without any cost.

Visit The Unarchiver →

References

  1. GZIP File Format - Library of Congress
  2. GNU tar Manual - GNU Project
  3. gzip - Wikipedia
  4. tar (computing) - Wikipedia