Skip to content

What is a TGZ file?

A .tar.gz packs a whole folder into one compressed file, and it is the standard way software and backups are shared on Mac and Linux. Windows needs an extra tool to open one, so converting to ZIP is often easier. You can convert TGZ files here, both into the format and out of it.

Specification

TGZ format specifications
Full nameGzip Compressed Tar Archive
Extensions.tgz, .tar.gz
Media typeapplication/gzip
CompressionLossless
Transparency
Animation
Multiple pagesSupported
Colour depthTar stream compressed end to end with gzip DEFLATE
Size limits
Introduced1992
Developed byGNU project convention
StandardOpen
Browser supportNot displayed by browsers

What TGZ is used for

  • Source code releases and Linux software tarballs
  • Server backups that must keep permissions and ownership
  • npm package tarballs and other language registry payloads
  • Moving whole directory trees between Unix systems

Strengths and limitations

What TGZ does well

  • Better ratio than ZIP on many small files with similar content
  • Keeps Unix permissions and ownership that ZIP handles poorly
  • Creating and extracting is a single command available everywhere

Where TGZ falls short

  • No index, so pulling one file means decompressing everything before it
  • Windows has no built-in extractor for it before recent versions
  • Corruption partway through can render the remainder unrecoverable

Convert TGZ to

Every target this format can be written out as, each on its own page.

Convert to TGZ

Everything that can be turned into a TGZ file.

Tools that accept TGZ

Questions about TGZ

What is a .tgz file?

A .tar.gz packs a whole folder into one compressed file, and it is the standard way software and backups are shared on Mac and Linux. The extension .tgz or .tar.gz identifies it, and its media type is application/gzip.

How do I open a TGZ file?

Browsers do not display TGZ natively, so you either need software that understands it or you convert it to something more common first. Converting is usually the faster route when you only need to look at the contents once.

Is TGZ lossy or lossless?

Lossless. Nothing is discarded, so repeated saves never degrade the contents.

What is TGZ good for?

Better ratio than ZIP on many small files with similar content. Keeps Unix permissions and ownership that ZIP handles poorly. Creating and extracting is a single command available everywhere. In practice that makes it a good fit for source code releases and Linux software tarballs, and Server backups that must keep permissions and ownership.

What are the drawbacks of TGZ?

No index, so pulling one file means decompressing everything before it. Windows has no built-in extractor for it before recent versions. Corruption partway through can render the remainder unrecoverable.

Other archive formats

Archives converter or the full format reference