THE FILE FIELD GUIDE
.tar.gz

tar.gz Archive

Archives

TAR.GZ bundles files with TAR and compresses the archive with gzip. Some tools leave a TAR after decompression; extract that archive too. Check the listing and destination before using its contents.

What it is used for
Bundling and compressing directory contents
What the file contains
Binary data
All sections, questions and sources

Content reviewed: · Editor:Kai

First: choose for your purpose

TAR.GZ is a TAR archive compressed by gzip. Removing gzip leaves TAR, which still needs extraction. Permissions/links can matter; renaming to ZIP is not equivalent.

Opening steps

Choose your environment or purpose to see its steps.

Windows: inspect two extraction layers

Check whether an intermediate TAR remains.

  1. Open a copy in a supporting tool such as 7-Zip and inspect contents.
  2. If gzip extraction produces TAR, extract TAR into a new folder too.
  3. Inspect final files/structure and distinguish extraction from installation.
macOS: Finder or tar

Use a dedicated new destination.

  1. Try Finder extraction of a copy and inspect the output.
  2. If Terminal is needed, distinguish listing from extraction using official guidance.
  3. Extract into an isolated destination and compare counts, permissions and links as needed.
Linux: list before extracting

Do not directly extract unknown archives into important existing folders.

  1. Inspect a copy with tar listing and look for unexpected paths/structure.
  2. Extract to a new folder with adequate space and verify structure.
  3. For source archives, read requirements/README before considering any script execution.

Menu labels and support vary by app, OS and version. Preserve the original before making changes.

Troubleshooting by symptom

  • Only TAR appears: decompression completed, but archive extraction remains.
  • Extraction error: check download completion, published checksums and free space.
  • Changed permissions/links: inspect operating-system and extractor support.
  • Only TAR appears: gzip was removed; inspect/extract the TAR layer.
  • Unexpected end: inspect incomplete/damaged downloads and compare published size/checksum if available.
  • Permissions differ on Windows: inspect filesystem/tool differences; Unix executable bits may not survive identically.

TAR.GZ → ZIP

  1. Extract separately and verify directory structure and file counts.
  2. Package needed files as ZIP and inspect the result.
  3. Compare final count, structure, permissions, links and required content.

ZIP may not preserve Unix ownership, permissions and symbolic links equivalently.

TAR and gzip have separate roles

TAR bundles files and gzip compresses that stream. TGZ commonly denotes the same combination, without proving validity.

Extract and re-archive for another format; ZIP renaming changes neither container nor compression.

Source for these steps:GNU Project · GNU tar — Creating and Reading Compressed Archives

Permissions, links and structure

Backups/distributions can depend on timestamps, permissions and symbolic links; inspect changes across OS/ZIP conversion.

Retain the source and verify required contents; compression size alone does not establish preservation.

Source for these steps:Apple · Compress and uncompress file archives in Terminal on Mac

Related-format differences

Related-format differences
Format / choicePurpose and preserved information
TAR.GZ / TGZTAR stream compressed with gzip; extract both layers.
GZGzip stream not necessarily containing multiple files.
ZIPDifferent archive structure requiring re-archiving.

Handling and security

Avoid extracting directly over existing data; inspect overwrites, absolute paths, links and excessive expansion.

Questions and answers

Why two suffixes?

They indicate TAR packaging followed by gzip compression.

Does a remaining TAR mean failure?

Some tools require a separate extraction step.

Can I rename it ZIP?

No; extract and repackage it.

Is extraction complete when TAR appears?

You still need TAR extraction to obtain its files.

Will ZIP preserve identical Unix permissions?

It depends on tools/environment; verify required attributes.

Format facts: name, steward and MIME type
Formal name
TAR archive compressed with gzip
Steward / specification
TAR / gzip implementations
MIME type
Depends on the producer or server; an extension alone does not establish a MIME type.

Primary and official sources