TGZ Archive Converter: Turn a .tar.gz Into a .zip in Your Browser

A .tgz lands in your downloads folder from a colleague, a build server, or a package mirror. You double-click it on Windows and nothing happens. That is not a broken file. Windows simply has no idea what to do with a Linux tarball, and the fastest way out is to convert it into a .zip you can open with a double-click.

This walkthrough covers what a .tgz actually contains, what changes when you repack it as a .zip, and how to do the whole conversion in a browser tab without installing 7-Zip or opening a terminal.

What a .tgz file really contains

The name says the recipe. .tgz is a short alias for .tar.gz, and it reads right to left: first tar, then gzip. Tar takes a folder tree and concatenates every file into one continuous stream, one header per file, no compression at all. Gzip then compresses that single stream in one pass.

That order matters more than the naming. Because gzip compresses the finished stream as a whole, .tar.gz is a solid archive: the compressor sees repetition across files and exploits it. A hundred small source files with similar boilerplate shrink far more inside one tar.gz than they ever would packed separately.

ZIP works the other way around. Every file is deflated on its own and then written into a container with a central directory at the end, an index that records the byte offset of each entry. Two consequences follow from that design:

  • You can pull one file out of a big ZIP almost instantly, because the tool reads the index and jumps straight to the bytes.
  • A tar.gz has no index. To reach the last entry, the decompressor has to walk everything before it.

So the two formats are not two spellings of the same thing. One optimises size by giving up random access, the other optimises access by giving up cross-file compression.

Why convert a .tgz to a .zip at all

The usual reason is the recipient, not the file. ZIP opens on Windows, macOS, iOS and Android with a double-click and no extra software. A tarball needs a tool.

Windows 11 has been able to unpack tar and gzip natively since late 2023, but Windows 10 still needs 7-Zip or a similar archiver, and mobile platforms have no native story at all. If you are sending assets to a designer, a client, or anyone on a locked-down machine where you cannot install software, a .zip removes every question.

There are secondary reasons. Some upload forms and build systems accept only .zip. Some old Windows tools choke on the double extension .tar.gz but are perfectly happy with .zip. And ZIP carries no solid-compression penalty, so browsing inside the converted archive is quick.

What you are doing in every case is a repack: unpack the gzip layer, read the tar entries, write them into a ZIP container. Unless the archive holds something ZIP cannot represent, the file contents come through byte for byte.

What survives the conversion and what does not

This is where most guides wave their hands. Here is the honest list.

Element Inside .tgz After repacking as .zip
File contents original bytes unchanged, byte for byte
Folder structure preserved preserved
Empty directories preserved preserved, if the tool writes them
Modification times preserved usually preserved
Unix permissions (rwx) native part of the format allowed by ZIP, often dropped on extraction
Symlinks and hard links preserved skipped or flattened, unreliable
Device files, sparse files preserved not representable
Password protection none at format level archives with passwords cannot be read by most browser tools
Random access no, sequential yes, central directory
Damage impact everything after the break one entry at a time

The takeaway: for documents, images, source trees and data dumps, conversion is lossless in practice. For backups of a Unix system where executables must stay executable and symlinks must stay symlinks, ZIP is the wrong target, and it stays wrong no matter which converter you use.

Converting a .tgz in the browser, step by step

No installer, no command line. One tab, two passes.

  1. Open the tool and switch to the Extract tab.
  2. Drop the .tgz into the drop zone. One archive per drop.
  3. Read the detected-format line. For a tarball it prints tar + gzip, which confirms the tool looked at the bytes rather than trusting the extension.
  4. The entries table lists every file with its size. Each row has its own download button, so you can pull just the two files you need instead of the whole tree.
  5. Switch to the Create tab, drop the extracted files in, and pick ZIP from the format dropdown.
  6. Press create, watch the progress bar, take the finished .zip.

Two details worth knowing before you start. The tool runs entirely on the client: the archive never leaves your device, which is what makes it usable for private files. And the practical ceiling is browser memory rather than a policy limit, so a tarball of tens of megabytes is comfortable while a multi-gigabyte one will fail in any browser-based tool.

If the archive is an encrypted ZIP, the page asks for the password and opens it. Archives encrypted in other formats, or split into parts (.zip.001, .part1.rar and friends), are named plainly instead of failing halfway, and those cases need a desktop archiver.

How big the result gets

A .zip is usually bigger than the .tgz it came from, and that surprises people.

Solid compression is efficient. When gzip compresses a whole stream, redundancy across files counts once. When ZIP deflates each file separately, the same boilerplate is compressed again inside every file that carries it. On a source tree of many small similar files, the gap can be noticeable, and on a few large dissimilar files it practically disappears.

Published benchmarks show the scale of DEFLATE, the algorithm ZIP uses and gzip wraps. A 1,008 KB HTML file compressed to 213 KB with gzip, about 79 percent smaller. A 349 MB CSV dropped to 164 MB, about 53 percent. Files that are already compressed, JPEG, PNG, MP4, MP3, barely move at all under either format, because there is no redundancy left to find.

So expect this pattern: text-heavy archives convert cleanly with a modest size increase, media-heavy archives were never going to shrink anyway, and the conversion mostly changes the container rather than the payload.

When you should keep the .tgz instead

Conversion is a one-way service to the recipient, and it costs something. Three situations where you should leave the tarball alone:

  • Backups of Unix systems. Executable bits and symlinks matter, and ZIP handles both poorly.
  • Shipping source code to a build pipeline. Package managers and CI systems expect tarballs, and some verify checksums that a repack will change.
  • Archives you will open one file at a time from a slow disk. Sequential reading is the price of solid compression, and it is a fair price for long-term storage.

The rule of thumb: keep .tgz for machines, convert to .zip for people. The bytes inside are identical either way, so nothing is lost except the metadata that made the tarball Unix-correct.

Frequently Asked Questions

Is .tgz the same as .tar.gz?

Yes, exactly the same file. The extension was shortened for filesystems that allowed only three characters, and the contents were never different. Any tool that opens one opens the other.

Do I need to install 7-Zip to convert a tgz?

No. A browser-based converter unpacks the gzip layer and repacks the entries in the page itself, so nothing is installed and nothing is uploaded. 7-Zip is only needed for archives encrypted in formats other than ZIP, or split into parts.

Does converting to ZIP lose files?

Files and folder structure survive. What can be lost is metadata: Unix permissions, symlinks and device entries have no reliable place in a ZIP, so the converter either skips them or writes them as ordinary files.

Why is the ZIP bigger than the tar.gz?

Because tar.gz compresses everything as one stream and exploits repetition across files, while ZIP compresses each file separately. On many small similar files the difference is visible, on a few large different ones it is negligible.

What is the size limit for a browser conversion?

The limit is your browser's memory, not a rule from the tool. Tens of megabytes are painless, a few hundred megabytes depend on the machine, and very large archives fail with an out-of-memory message instead of a corrupted file.

Can I convert a .tar.bz2 or .tar.xz the same way?

Yes. The tool identifies formats by file signature, so bzip2, xz, zstd and lz4 variants of a tarball are recognised and extracted just like gzip. Uncommon formats are refused honestly rather than half-processed.

Will the converted ZIP open on a Mac?

Yes. ZIP is native on macOS, Windows, iOS and Android. The extracted files keep their contents and names, but executable permissions from the original tar are not restored by Finder.

yohan zhou
yohan zhou

China · SO reputation 2000 · Badges: 2🥇13🥈10🥉 · SO member since 2011