GZ to ZIP

Nothing you choose here leaves your browser, and nothing is downloaded to make it work — not a library, not a compression module, nothing. Your browser already knows how to deflate and gzip; this page writes the ZIP around it.

…or drop one anywhere on this page.

A .gz holds one file. A ZIP holds a list, so this gives you a list of one.

That sounds like a technicality and it is the most useful thing to know about the format: gzip compresses a single stream and keeps no list of names, sizes or folders. If you were expecting several files to come out, what you have is a .tar.gz — a tar of many files that was then gzipped — and that page is the one you want. This one decompresses the single stream and puts it in a ZIP, so that Windows will open it without being asked twice.

How this works, and why nothing is fetched

Your browser already knows how to un-gzip, because it needs to for web pages, and this page reaches that through DecompressionStream. What it then writes — a ZIP directory or a tar header — is a byte layout rather than an algorithm, so it is written outright. Nothing is fetched and nothing is installed.

A .gz is not an archive, and does not always know the name

gzip compresses one stream. It keeps no list of contents, no folders, no sizes and no permissions — there is nowhere in the format to put them. A file that unpacks to several files is a .tar.gz: a tar, which is an archive, that was then gzipped. If that is what you have, the tar.gz pages are the ones that will list your files.

The name is the part that catches people. The gzip header has one optional field for the original filename. Most tools fill it in; some do not, and anything gzipped as it is being written cannot. When it is missing there is nothing left to go on but the name of the .gz itself with the extension removed — which is why data.gz comes out as data, with the .txt somebody was expecting nowhere to be found. Both cases are handled here: the header is read when it is there, and the fallback is said on screen rather than presented as fact.

What it will not do

It will not open a RAR, and nothing ever writes one: RARLAB's licence forbids using their code to re-create the RAR algorithm, which is proprietary. That is a legal restriction and not a difficulty. It will not open a 7z, bzip2 or xz either — those need compressors your browser does not have, so supporting them would mean shipping one, which is the thing this page avoids. It says which of these it is looking at rather than just refusing.

It does not open password-protected archives, and it says so per file rather than failing silently. It reads plain ZIPs rather than ZIP64, so an archive over 4 GB or with more than 65,535 files is refused with that reason given.

Where to go next