Cookies for analytics and advertising
We use cookies for analytics and advertising, both sent to Google. Refusing changes nothing you can see.Read the privacy page
Converting ZIP to XZ trades packing time for transfer size: the contents are written into a TAR and compressed with LZMA2, whose dictionary reaches 64 MB against the 32 KB window a ZIP uses. On source trees and datasets that is a large difference, which is why releases and packages settled on `.tar.xz`, and why this is the target when a file is downloaded more often than built.
Up to 100 files at once. Mixed formats are fine.
They convert one after another and download together as a ZIP.
ZIP to XZ
Compression time is paid by one machine, once. Transfer is paid by everyone who fetches the file, every time, and on a metered bucket or a CDN it is paid in money as well as seconds. That asymmetry is the entire case for XZ, and it is why the format's summary in our registry calls it the standard for source and package downloads.
It also tells you exactly when not to bother. An archive that one colleague will open once has no economics to optimise: the seconds spent packing are the only seconds involved in the file's entire life, and gzip would have finished already. Reach for XZ when the file has an audience, a mirror, a CDN bill or a long shelf life, and leave it alone when the file has a single recipient. The same reasoning explains why distributions moved their package archives to xz years ago and why nobody bothers compressing a build artefact that lives for eleven minutes inside one pipeline.
XZ is a compressor rather than an archive. The registry records it as a stream format with one member and flags the absence of any directory structure as a known problem — there is nowhere in an `.xz` file for a name, a path or a permission bit to live.
The contents of your ZIP are therefore laid out in a TAR, which carries all of that, and XZ compresses the tarball as a single object. This is not a workaround invented for this converter; it is the arrangement the entire Unix ecosystem uses, and it is why the extension you see on every source release is `.tar.xz` rather than a bare `.xz`. It also means the two layers are doing genuinely separate jobs, which is worth remembering when you publish: replacing xz with a different compressor later changes nothing about the tar inside, so the archive's structure is not a decision you are locking in today.
The number is the story. DEFLATE, which both ZIP and gzip use, encodes a repeat as a reference to something within the last 32 KB. LZMA2 in XZ can reference something up to 64 MB back — two thousand times the distance — and it encodes those references with a range coder that costs fewer bits than DEFLATE's Huffman codes.
Where that shows is any archive whose repetition is spread out: a source tree where the same licence header opens two hundred files, a dataset of similar CSV exports, a folder of documents built from one template. Where it shows least is a ZIP of photographs or video, because the content was compressed before it was archived and there is nothing left for a longer window to find.
A large dictionary is not free at the other end. The decompressor has to keep that window in memory to resolve references into it, so the memory needed to unpack roughly tracks the dictionary the file was packed with rather than the size of the file itself.
On any desktop or server this is irrelevant. It stops being irrelevant on small hardware — a router, a microcontroller-class board, a constrained build agent — which is the one place where gzip's modest 32 KB window is an advantage rather than a limitation. If you know your archive is destined for something small, that is a reason to publish a `.tar.gz` alongside it.
They share a compression family and the registry gives both a dictionary of up to 64 MB, so on ratio there is little to choose between them. The difference is what surrounds the compressed data. 7Z is a container with its own directory of entries, its own encryption and its own checksums. XZ is a compressor wrapped around one stream.
For distribution, the stream wins on convention: every Linux and macOS box has `tar` and `xz`, and almost none has 7-Zip installed by default. For an archive you are keeping and browsing rather than publishing, 7Z is the better shape because you can list it and pull one file without unwrapping two layers. Same compression, opposite ergonomics.
Both formats verify themselves. A ZIP stores a CRC per entry, so a damaged member is caught when it is extracted. XZ carries a check over its compressed stream — CRC-32, CRC-64 or SHA-256 depending on how it was written — and refuses to hand you data that does not match.
What changes is the granularity. In a ZIP the check is per file, so one bad entry is one bad file. In an `.xz` the check covers the stream, so damage is reported for the archive as a whole and the tar inside may be unrecoverable past the damage. For anything you are publishing, an external checksum file next to the download is still worth the two lines it takes.
A gzip stream can record the original file name; an XZ stream records nothing of the sort. It is compression with a header describing the check and the filters, and no place at all for a name or a timestamp.
That puts the whole burden of describing the file on what you call it. Downloads here take your original stem plus the target extension, so `release-1.4.zip` returns as `release-1.4.xz`; renaming it to `release-1.4.tar.xz` before you publish is the difference between a download people recognise and one they have to probe. It is the single most useful thing you can do to the file after converting it.
The conversion runs on our converter rather than in your browser, so the ZIP is uploaded over an encrypted connection, unpacked with 7-Zip, tarred, compressed with xz and returned. Upload, intermediates and output are deleted when the job finishes; the scratch space is memory-backed and goes away with the container that used it.
The consequences are the free tier's 25 MB per file, a sixty-second ceiling per job, a refusal for any archive declaring more than 2 GB of unpacked content, and a clean failure rather than a hang on a password-protected ZIP. If the archive is genuinely sensitive, xz-utils and 7-Zip both do this offline on your own machine.
Projects that get this right ship two files. The `.tar.xz` is for the people who will unpack it in a shell or a script, where the smaller download is real bandwidth and the tooling has been installed since the operating system was. The ZIP stays for everyone on Windows who wants to double-click it, look inside, and never think about compression algorithms at all. Both are made from the same tree and neither is a compromise.
That is not indecision; it is two audiences with genuinely different constraints, and one file cannot serve both without penalising one of them. If you only ever ship a single artefact, ship the one your actual downloaders can open — a beautifully compressed archive nobody can unpack is a support ticket with an excellent ratio, and the bytes you saved are paid back many times over in messages asking what a `.tar.xz` is.
If the ZIP is part of a build that is meant to be reproducible, be aware that repacking is not a neutral operation. The bytes of the members are preserved exactly, but the archive around them is written fresh: entry order, timestamps and the compressor's own choices all come from the machine doing the packing rather than from the archive you uploaded. Two conversions of the same ZIP can therefore differ from each other while both being entirely correct.
That matters only if something downstream is checksumming the archive rather than its contents. Release pipelines that publish a hash next to the download should generate that hash from the file they are actually shipping, computed after the final repack, and never carried over from an earlier artefact. If byte-identical output across runs is a requirement, it belongs in a local, pinned toolchain where the compression settings are yours to fix, not in a web converter.
| ZIP | XZ | |
|---|---|---|
| Full name | ZIP Archive | XZ Archive |
| File extension | .zip | .xz |
| Media type | application/zip | application/x-xz |
| Compression | Lossless — nothing is discarded | Lossless — nothing is discarded |
| First published | 1989 | 2009 |
| Published by | PKWARE | — |
| Specification | APPNOTE.TXT | — |
| Licensing | Open standard | Open standard |
| Standing today | Current | Current |
| Opens in a browser | No browser | No browser |
| Considered instead | 7Z, TAR | GZ, BZ2, 7Z |
Nothing is discarded. ZIP and XZ both store their content losslessly, so the conversion is a change of packaging rather than a change of quality, and it can be repeated without accumulating damage.
XZ compresses a single stream and cannot hold a directory. That is precisely why XZ is normally paired with an archive format — the archive collects the files, XZ compresses the result.
7-Zip reads both ZIP and XZ, so there is a way to check the result against the original without a second tool.
XZ works over 8 MB at a time against ZIP's 32 KB — that is the span a repetition has to fall inside before it can be compressed away. It is where the difference in ratio comes from, and where the extra time goes.
The two are aimed at different work: ZIP at moving data between programs and handing a finished file over, XZ at archiving. That is worth weighing before converting, because the reason one exists is usually the reason the other is awkward.
ZIP is PKWARE's format, published in 1989. The specification is APPNOTE.TXT, and it is worth reading if the file has to outlive the tool that wrote it.
XZ dates from 2009. xz, 7-Zip and Keka all read it.
ZIP was published in 1989 and XZ in 2009. The older one is generally the safer file to hand to somebody; the newer one usually does the job in fewer bytes.
Yes — this conversion needs software that cannot run in a browser, so the file is uploaded over an encrypted connection. It is deleted as soon as the job finishes, and the result is sent straight back to you without being stored. The work is done by 7-Zip, the archiver, in its command-line form.
It looks back much further. ZIP and gzip both compress against a 32 KB window, while XZ uses LZMA2 with a dictionary the registry records at up to 64 MB. Repetition that the other two never see is repetition XZ can encode as a reference.
They do not, directly. The contents are written into a TAR and XZ compresses that one tarball — the `.tar.xz` arrangement used by nearly every source release and distribution package.
Much less than its compression time suggests. Packing with a large dictionary is expensive; unpacking is a fairly direct decode and is comfortably faster than bzip2. That asymmetry is exactly why it suits files that are made once and fetched often.
More than gzip, and it scales with the dictionary the file was packed with, because the decompressor has to hold that window. It is a non-issue on a laptop and worth a thought on a small embedded target.
Not on its own. Explorer handles ZIP and nothing else here; the recipient needs 7-Zip, PeaZip or similar. On Linux and macOS with the usual tools, `tar -xJf` unwraps both layers at once.
25 MB per file, since the repack runs on our server. Jobs are killed after sixty seconds and any archive claiming to expand past 2 GB is refused before it is unpacked.
The claims this page makes about ZIP and XZ are checkable, and these are the documents that settle them.