How to use the tar and gzip extractor
- Choose a .tar, .tar.gz, .tgz or .gz file. Files up to 25 MB are read and up to 300 MB of unpacked data.
- Read the listing: each entry with its type, size, permissions and modified time, and a checksum note for damaged headers.
- Choose Download on a file row to save that file, or Download files as ZIP to save every regular file.
- Use Download list (.csv) to keep the listing, with link targets and checksum results.
Tar and gzip in plain words
Tar joins many files into one file, and gzip compresses a single file. A .tar.gz or .tgz is a tar archive compressed with gzip. A tar archive is a series of blocks. Each entry starts with a 512-byte header holding the name, permissions, size in octal, modification time, a checksum and a type flag, followed by the file data padded to 512 bytes. Two empty blocks end the archive. Names longer than 100 characters are stored in a prefix field, in a GNU long-name entry or in a PAX extended header, and all three are read.
The tool unpacks gzip data with a cap on the output, then checks the checksum of every tar header. The checksum is the sum of the 512 header bytes with the checksum field counted as spaces. A header that fails is reported and reading stops there. A plain .gz file that is not a tar archive holds one file, which is unpacked as it is.
What gets saved and what does not
Regular files are listed with a download button and go into the ZIP. Folders, symbolic links, hard links and special files are listed but not saved, because they depend on a file system. File names are cleaned before they go into a ZIP: leading slashes, drive letters, ".." parts and unsafe characters are removed so nothing can point outside its folder, and the page says how many names were changed. A test archive with a 166-character path, a folder, an empty file, a symbolic link and a binary file lists exactly the members that the Python tarfile module reports, with the same sizes, permissions and dates.
Bzip2, xz, zstd, 7z and rar files are not supported, and a ZIP is sent to the unzip extractor. To make a ZIP from loose files, use the ZIP file creator. To look at raw bytes, use the hex viewer.
Assumptions and limits
- The archive is a POSIX or GNU tar, optionally gzip-compressed. Sparse files are listed but their data is not rebuilt.
- Nothing is run or installed. Scripts and executables in the archive are only saved as files if you ask.
- Modified times are shown in UTC from the seconds stored in the header.
- Up to 10,000 entries are listed, with the first 300 shown on the page.
Frequently asked questions
What is the difference between .tar.gz and .tgz?
They are the same thing. A .tgz is a short name for a tar archive compressed with gzip. Both unpack to a tar archive and then to files.
Why are some entries not saved?
Folders, links and device files describe the file system and not file contents, so they cannot be placed in a ZIP as they are. They are listed so you can see the full structure.
Why did reading stop partway?
The page checks each header checksum. If a header is damaged, it stops there and says so, because every later header would be read from the wrong place. The entries before the problem are still listed.
Is a big .gz file a risk to my browser?
The page unpacks with a limit of 300 MB and stops with a message if the data grows past it. This guards against a tiny file that expands into a huge one.