How to open .tar.gz files

Linux-style compressed tarballs explained, with instructions for every major operating system.

Updated April 2026 6 min read Beginner
Quick answer
  • Mac & Linux: double-click — built-in support. Or Terminal: tar -xzf archive.tar.gz
  • Windows 10/11: built-in support since 2017. Right-click → Extract. If that fails, use 7-Zip (you need to extract twice: .tar.gz → .tar → files).
  • No password protection is built into .tar.gz. If you received one with a password, it’s been put inside a .zip or encrypted .7z.

What is a .tar.gz file?

A .tar.gz file (also called a “tarball”) is actually two things bundled together:

  • .tar — a container format that bundles many files into one (without compressing).
  • .gz — gzip compression applied to the tar container.

It’s the Unix/Linux equivalent of a ZIP, and extremely common for open-source software distributions. You may also see .tgz (identical, just shorter) or .tar.bz2 / .tar.xz (different compression methods).

Open .tar.gz on Windows

Method 1 — built-in (Windows 10 and 11)

Starting with Windows 10 version 1803 (2018), Windows can natively extract .tar.gz files.

  1. Right-click the .tar.gz Windows 11: choose Show more options first.
  2. Click “Extract All” Choose a destination.
  3. Click Extract

Method 2 — 7-Zip (more reliable)

If the built-in method fails or gives a cryptic error, 7-Zip handles .tar.gz cleanly — but note the two-step nature:

  1. Right-click .tar.gz → 7-Zip → Extract Here You get a .tar file.
  2. Right-click the .tar → 7-Zip → Extract Here Now you get the actual files.
One-step extraction in 7-ZipRight-click → 7-Zip → Extract to “folder” skips the intermediate .tar step. 7-Zip automatically unpacks both layers for you.

Open .tar.gz on Mac

Double-click it. macOS’s built-in Archive Utility handles .tar.gz, .tgz, and .tar.bz2 without extra software.

For more control, use Terminal:

  • Extract into current folder: tar -xzf archive.tar.gz
  • Extract to specific folder: tar -xzf archive.tar.gz -C ~/Desktop/target
  • See contents without extracting: tar -tzf archive.tar.gz

Open .tar.gz on Linux

Terminal (always works):

  • tar -xzf archive.tar.gz — extract here
  • tar -xjf archive.tar.bz2 — bzip2 variant
  • tar -xJf archive.tar.xz — xz variant

The flags: x = extract, z/j/J = compression method, f = file name follows. Add -v for verbose output.

GUI: most file managers (Nautilus, Dolphin, Nemo) support double-click extraction out of the box.

Frequently asked questions

Why are there two extensions (.tar.gz)?

Historical reasons. tar bundles files (hence “tape archive” — it was originally for backup tapes). gzip compresses a single file. Combining them produces a compressed bundle. Modern tools handle the two steps transparently.

What’s the difference between .tar.gz, .tgz, and .tar.bz2?

.tar.gz and .tgz are identical — just different naming conventions. .tar.bz2 uses bzip2 compression instead of gzip — slightly better compression but slower. .tar.xz uses xz compression, which is slower still but compresses best of all.

Can I password-protect a .tar.gz?

Not natively — tar and gzip don’t support encryption. Use a different format (encrypted ZIP or 7z) or encrypt the .tar.gz separately with GPG: gpg -c archive.tar.gz.