b2KIT

TAR Archive Viewer

Browse and extract files from .tar, .tar.gz (tgz), and .tar.bz2 archives in the browser.

Tested tool guide Tested browser tools Checked August 16, 2026

What TAR Archive Viewer does, with a checked example

Drop a .tar, .tar.gz, or .tar.bz2 file onto this page and you get the archive's full listing in your browser: every entry's name, size, and type, plus a way to download any single file without unpacking the rest. The whole job runs locally, so nothing you load is uploaded anywhere. The usual surprise is that .tar.gz is two layers, not one: a gzip stream wrapped around a tar stream, so the browser has to decompress the entire archive before it can show even the first entry. The sizes in the listing are the uncompressed content sizes.

Worked example

A concrete input and expected output from the current implementation.

Input

Select sample.tar, built from two files: readme.txt (22 bytes: the text "TAR viewer test file." plus a newline) and data.txt (4 bytes: "data").

Expected output

readme.txt  22 bytes  file
data.txt  4 bytes  file
2 entries

The sizes come from each entry's ustar header and match the content defined above: 22 and 4 bytes. The archive is not 26 bytes, though - each file costs a 512-byte header plus a 512-byte padded data block, and the archive ends with 1024 zero bytes, so sample.tar is at least 3072 bytes on disk.

How the result is produced

1

How the listing is built

A tar archive is a sequence of 512-byte blocks. Each entry begins with a 512-byte ustar header with the name, permissions, and content size in octal, followed by the content padded with zeros to a 512-byte multiple. Two zero blocks mark the end. There is no central directory, so the tool reads the headers in order; the size shown is the byte count stored in each header.

2

Decompression happens before parsing

For .tar.gz and .tar.bz2, the browser inflates the whole gzip or bzip2 stream to recover the raw tar bytes; you cannot seek into a compressed stream to grab one file. Extracting an entry returns exactly the byte count from its header, zero padding stripped, so recovered files are byte-identical to the originals. Large archives must fit in working memory, which sets a practical upper size.

Good uses

  • You downloaded a tarball and want to confirm it holds what it should - a license file, a config template, the expected folder layout - before extracting it anywhere.
  • You need a single file out of a big backup or log bundle, such as one day's log from a .tar.gz holding months.
  • You built a tarball for distribution and want to check names, permissions, and structure before shipping it, or you received one on a machine that has no tar installed.

Limits and checks

  • Three sizes to keep apart. The listing shows each entry's uncompressed content size; the archive on disk is larger (every file costs a 512-byte header plus padded blocks); a compressed .tar.gz on disk is usually smaller than the sum of entries.
  • Directory and symlink entries carry no content: their size is 0, and a symlink's entry stores a target path instead of data. Paths in the listing can include ../ segments, and extraction recreates the stored path, so read the paths before extracting anything.
  • Only the three formats are accepted. A .tgz that is really something else, a nested archive such as a .tar.gz inside a .tar.gz, or a truncated download will fail to list or will show entries cut off mid-stream.

Common questions

Can I create an archive here, or add or remove files from one?

No. This tool reads and extracts; it does not build or modify tarballs. Creating one is a job for the tar command (tar -cf) or a file manager. Because it only reads, opening an archive here never changes the original file, which also makes it a safe place to inspect an unfamiliar tarball.

Why is the archive bigger than the files inside it?

Every entry pays a 512-byte header, and its content is padded up to the next 512-byte boundary, so a 14-byte file occupies a full kilobyte inside the archive, which also ends with 1024 zero bytes. With .tar.gz or .tar.bz2 the file on disk is compressed on top of that, so it can end up smaller than the sum of the entries.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools