.tgz File Extension

Learn what a .tgz file contains, how to open and extract it, how Poly supports it, and when another archive format may work better.

File extension details for .tgz

Storage Only
File typeGzip-compressed TAR archive
MIME type
EncodingBinary TAR archive wrapped in a lossless Gzip stream
Operating systemsWindows, macOS, Linux, Unix
Opens withGNU tar, 7-Zip, Apple Archive Utility, WinRAR
Poly supportYes. Poly stores, syncs, shares, versions, and downloads .tgz files.
Indexed by PolyPartial. Poly indexes the filename and ordinary file properties, not the compressed archive contents.
Preview in PolyNo. Download the file to inspect or extract it with an archive utility.
Poly agentNo. The Poly agent cannot read files inside the compressed archive.

What kind of file is a .tgz?

A .tgz file is normally a TAR archive compressed with Gzip. It is a compact spelling of .tar.gz. TAR first bundles files, directories, and metadata into one stream; Gzip then compresses that stream losslessly.1

The appropriate media type for the outer stream is usually application/gzip, although its IETF registration lists .gz, not .tgz, as the file extension.2 A genuine Gzip member begins with magic bytes 1F 8B; the common third byte 08 identifies DEFLATE compression. After decompression, a normal .tgz payload should contain a valid TAR archive.3

Renaming archive.zip, archive.tar, or another file to archive.tgz does not convert it. Check the Gzip signature and let an archive tool validate both layers.

How do I open a .tgz on my computer?

  • On Windows, use the built-in tar command or an archive app such as 7-Zip.
  • On macOS, double-click the file to try Archive Utility, or use tar in Terminal.
  • On Linux and Unix, use GNU tar or a desktop archive manager.

GNU tar recognizes .tgz as Gzip-compressed TAR and can inspect or extract it directly.1 List an unfamiliar archive before unpacking it:

tar -tzf package.tgz

Then extract it into a new, empty directory. Review member paths for absolute names, .. parent references, symbolic links, device nodes, and unexpected executables. GNU tar recommends isolating untrusted archives because unsafe paths and links can overwrite files outside the intended location.4

Poly support for .tgz

Poly stores, syncs, shares, versions, downloads, and finds .tgz files by name. Poly does not currently infer Gzip from the .tgz suffix, decompress either layer, preview the archive, index member names or contents, or give the Poly agent access to files inside it.

Download the archive and extract it with a trusted local utility when you need its contents. Add the extracted files to Poly separately to receive the preview, search, metadata, and agent features available for their formats.

History of .tgz

Jean-loup Gailly wrote the original GNU gzip program, with decompression code by Mark Adler. The project dates to 1992 and was developed as a free replacement for the older Unix compress utility.5 RFC 1952 documented the Gzip file format in 1996, and RFC 6713 registered application/gzip in 2012.23

The .tgz convention combines the roles of TAR and Gzip in a short suffix. GNU gzip recognizes it as shorthand for .tar.gz and can use .tgz when compressing a filename ending in .tar would otherwise require truncation. GNU tar also maps .tgz to Gzip for automatic compression selection.16

Working with .tgz and alternatives

FormatGood fitMain tradeoff
.tgzCompact, familiar Unix tarball name.tar.gz makes both layers more explicit
.tar.gzBroadly compatible source releases and backupsSame TAR and Gzip layers, with a longer name
.tar.xzSmaller distribution archives in many workflowsSlower compression and less universal support
.tar.zstFast modern compression and decompressionOlder tools may need Zstandard installed
ZIPFamiliar cross-platform sharing and per-file accessDifferent archive model and Unix metadata handling

Gzip includes a CRC-32 for accidental-corruption checks, but it does not authenticate the archive. A small compressed file can also expand substantially. Apply storage and time limits, inspect TAR members before extraction, and verify a trusted digest or signature when provenance matters.23

Converting to ZIP or another tarball requires decompressing or extracting and then creating a new archive. Changing only the suffix changes no bytes.

Footnotes

  1. Free Software Foundation. GNU tar: Creating and Reading Compressed Archives. GNU tar documents compressed TAR handling and maps .tgz to Gzip. 2 3
  2. Internet Engineering Task Force. RFC 6713: The application/zlib and application/gzip Media Types. The registration specifies application/gzip, the .gz extension, and security considerations. 2 3
  3. L. Peter Deutsch. RFC 1952: GZIP File Format Specification Version 4.3. The specification defines Gzip magic bytes, DEFLATE method identifier, trailer, and CRC behavior. 2 3
  4. Free Software Foundation. GNU tar: Integrity. The guidance covers isolated extraction, links, absolute names, and overwrites.
  5. Free Software Foundation. GNU Gzip. The GNU project credits Gailly and Adler and explains Gzip's replacement of Unix Compress.
  6. Free Software Foundation. GNU Gzip Manual: Overview. The manual documents .tgz as shorthand for .tar.gz and its filename-truncation behavior.
© Poly Corp. 2026