A tar archive (“tape archive”) is the standard way to bundle many files on Unix systems, often gzip-compressed as .tar.gz or .tgz. Unlike a ZIP it has no central index — it is simply a stream of file headers and data. This inspector reads those headers in your browser so you can see everything inside, including Unix-specific metadata like file mode and owner, and pull out individual files.
How it works
Tar stores each file as a 512-byte header block followed by the file’s data, padded up to the next 512-byte boundary. The tool walks that stream block by block. For each header it reads, from fixed byte offsets, the file name (and any USTAR prefix to rebuild long paths), the size and mtime (stored as octal text), the permission mode, the uid/gid and user/group names, and the type flag that distinguishes regular files, directories, symlinks, and special entries.
If the file begins with the gzip magic bytes 0x1f 0x8b, the tool first pipes it through the browser’s native DecompressionStream('gzip') and parses the decompressed tar. To extract one file, it slices the data bytes that follow that entry’s header — no re-reading of the rest of the archive.
Notes and tips
- Two consecutive all-zero blocks mark the end of the archive; the tool stops there.
- Sizes and times are octal in the header — a detail that trips up naive parsers but is handled here.
- GNU long-name (
L) and PAX extended headers are recognised so long paths display correctly. - Extraction is local; the downloaded file never touches a server.