How to extract a TAR.GZ file
- Drop a
.tar.gzor.tgzfile onto the drop zone above, or click Choose a file. - Leave Password (only if the archive is encrypted) blank. Tarballs have no built-in encryption; the field exists for encrypted ZIPs.
- Click Extract files. The gzip layer is removed and the TAR inside is unpacked in one step.
- Every file appears in the results with its path and a Download button. Download all (ZIP) gathers them into a single ZIP.
The tarball is decompressed inside your browser. Source code, server backups and log bundles stay on your machine.
Why a tarball has two extensions
A .tar.gz file is two formats stacked on top of each other. First, tar (short for tape archive, from early Unix) concatenates the files into one stream, recording each file's path, size, permissions and modification time. Tar does no compression at all. Second, gzip compresses that single stream with the Deflate algorithm. Decompressing gives you back the plain .tar, and unpacking that gives you the files.
Because gzip sees the whole archive as one stream, a tarball behaves like a solid archive: repeated content across many small files compresses well. The downside is that you cannot pull out one file without decompressing everything before it, which is why tarballs are mainly used for distributing and backing up whole directory trees rather than for random access.
The short extension .tgz means exactly the same thing as .tar.gz. It dates from systems that only allowed a single short extension, and both forms are accepted here.
Extracting on the command line
Linux and macOS ship with tar, and Windows 10 and 11 include tar.exe in Command Prompt and PowerShell. The usual command is tar -xzf archive.tar.gz, where x means extract, z means filter through gzip, and f names the file. Add -C folder to extract somewhere else, or use tar -tzf archive.tar.gz to list the contents first. On macOS, double-clicking the file in Finder also works through Archive Utility.
Tips
- If the file ends in
.tar.bz2or.tar.xz, use Extract TAR, which handles plain, bzip2 and xz tarballs. - Need the contents as a ZIP for a Windows user? TAR.GZ to ZIP converts it in one step.
- A
.gzthat holds just one file (such as a compressed log) opens in Open GZ Files. - To build a tarball from your own files, use Create TAR.GZ.
Frequently asked questions
What is the difference between .tar.gz and .tgz?
None. Both are a TAR archive compressed with gzip. The four-letter form is just a shorter name for the same file.
Are file dates and Unix permissions restored?
No. You download ordinary files through the browser, so they get the current date, and the permission bits and ownership stored in the tar headers are not applied. Run tar -xzf on Linux or macOS when those details matter.
How big a tarball can I open?
The compressed archive and its extracted files are held in browser memory. Above about 700 MB processing slows down, and inputs over 2 GB are refused.