How to Convert TAR.GZ to 7Z Online
- Upload Your TAR.GZ File: Drag and drop or click "+ Add Files" to load one or more
.tar.gz(or.tgz) tarballs. Batch upload is supported — drop a folder of release tarballs in one pass. files are processed on our servers and deleted automatically after a few hours, never gated behind a login. - Pick Single Archive or Individual Archives: Default is Single Archive — every uploaded tarball is repacked into one combined
.7z. Choose Individual Archives to produce a separate.7zfor each input, which is what you usually want when re-distributing a batch of release packages. - Review Defaults (Optional): xconvert applies sensible LZMA2 defaults; no manual codec, dictionary-size, or solid-block tuning is required. Output is a standard 7z container readable by 7-Zip 9.20+, p7zip, Keka, The Unarchiver, and any archiver that supports the LZMA2 codec.
- Convert and Download: Click "Convert" and download each
.7zindividually or as a bundle. No sign-up, no watermark, no file-count gate.
Why Convert TAR.GZ to 7Z?
.tar.gz (a tar archive piped through gzip) is the de-facto Unix distribution format — POSIX-standardised, supported everywhere, and great at preserving Unix permissions, ownership, timestamps, and symbolic links. But gzip is a 1992-era DEFLATE-based codec that trades compression ratio for raw speed. .7z with LZMA2 routinely shrinks the same payload another 20–50% smaller, which matters when you're paying for bandwidth, storage, or a slow upload pipe. Typical scenarios:
- Shrink release artefacts for distribution — A Linux source tarball that lands at 80 MB as
.tar.gztypically packs to 50–60 MB as.7zwith LZMA2; over a million downloads, that's terabytes of CDN bandwidth saved. Apache, KDE, and the Linux kernel ship.tar.xz(the same LZMA2 codec) for exactly this reason. - Archive old projects on cheap cold storage — S3 Glacier, Backblaze B2, and Wasabi all bill by GB-month. Re-packing a 200 GB historical
.tar.gzlibrary to.7zcan claw back 40+ GB without losing any data. - Email a directory tree that's currently too big — Personal Gmail and Outlook.com cap attachments at 25 MB and 20 MB respectively. A 30 MB
.tar.gzof source code often slips under both caps as.7z. - Add strong encryption — 7z supports AES-256 with SHA-256 key stretching (524,288 iterations) plus optional filename encryption — features
.tar.gzdoesn't natively offer. Useful for client deliverables or anything containing credentials. - Faster random access to one file — gzip is a streaming codec: extracting
file.txtfrom a 5 GB.tar.gzdecompresses the whole archive up to that point. 7z's block layout lets archivers seek to a specific entry without scanning everything before it. - Standardise on one archive format across a team — Windows colleagues who only have 7-Zip installed don't need a
tarbinary; macOS users running Keka or The Unarchiver get a one-step extract instead of the two-stepgunzip → tar -xfdance.
Want to go further? Pack to the streaming-friendly TAR.XZ (same LZMA2 codec, keeps Unix metadata) or normalise everything to a cross-platform ZIP. To pull files out without converting, use extract TAR.GZ or extract 7Z.
TAR.GZ vs 7Z — Format Comparison
| Property | TAR.GZ | 7Z |
|---|---|---|
| Released | tar: Unix v7 (1979); gzip: 1992 | 1999 (7-Zip, Igor Pavlov) |
| Default codec | DEFLATE (gzip) | LZMA2 |
| Typical compression ratio | Baseline | 20–50% smaller than gzip on text/source/log data |
| Unix permissions / ownership | Preserved (in tar layer) | Not stored natively |
| Symbolic links | Preserved | Not preserved |
| Built-in encryption | None (relies on GPG separately) | AES-256 with SHA-256 key stretching |
| Filename encryption | No | Yes (optional) |
| Random-access extract | No — must stream from start | Yes — block-level seeking |
| Max dictionary | gzip 32 KiB | LZMA2 up to 4 GB |
| Native OS support | Linux, macOS, BSD (all ship tar + gzip) |
None — requires 7-Zip / p7zip / Keka |
| Use cases | Source distribution, system backups, CI artefacts | Maximum compression, password-protected archives, Windows-first sharing |
LZMA2 Compression — What's Happening Under the Hood
| Aspect | gzip (used in.tar.gz) | LZMA2 (used in.7z) |
|---|---|---|
| Algorithm | LZ77 + Huffman coding (DEFLATE, RFC 1951) | LZ77 + range coding + Markov chain modelling |
| Window / dictionary | 32 KiB sliding window | Up to 4 GB sliding dictionary |
| Best-case ratio on plain text | ~3:1 | ~5–7:1 |
| Compression speed | Fast — typically 50–200 MB/s on modern hardware | 2–5× slower than gzip at comparable levels |
| Decompression speed | Very fast | Slower than gzip but typically faster than bzip2 |
| Memory at compression | ~256 KB | 100s of MB at high dictionary sizes |
| Memory at decompression | ~64 KB | Roughly equal to dictionary size used at compress time |
| Streaming-friendly | Yes | Yes (LZMA2 chunks the stream — improvement over original LZMA) |
LZMA2 is the same codec used inside .tar.xz and .xz — the algorithm hasn't changed, only the container. If you want LZMA2 compression while preserving Unix permissions and symlinks, convert to TAR.XZ instead.
Frequently Asked Questions
Will my Unix file permissions and symlinks survive the conversion?
No — the 7z container does not store POSIX permissions, ownership, or symbolic links. xconvert preserves the inner tar layer (file contents and directory structure), but chmod/chown metadata and symlinks inside the tarball are lost when wrapped in a .7z. If you need to preserve Unix metadata while still using LZMA2, convert to .tar.xz instead — same codec, keeps the tar layer intact.
How much smaller will my file actually get?
It depends entirely on what's inside. For highly compressible content — source code, log files, JSON, XML, uncompressed text — expect 20–50% smaller than the .tar.gz because LZMA2's 4 GB dictionary spots long-range repetition that gzip's 32 KiB window misses. For already-compressed payloads (JPEGs, MP4s, opus audio, pre-compressed .deb or .rpm packages) the gain shrinks to 1–5% because the data is near its entropy floor regardless of codec.
Will 7-Zip on Windows and Keka on macOS open the output?
Yes. The output is a standard .7z container with the LZMA2 codec. 7-Zip 9.20+ on Windows, p7zip on Linux, Keka and The Unarchiver on macOS, and the built-in extractors in most file managers (Dolphin, Nautilus, PCManFM) all open it. iOS Files can preview but won't extract — recipients on iPhone need a third-party app like iZip or Documents by Readdle.
What about .tgz files — are they the same as .tar.gz?
Yes. .tgz is just an alternate file extension for .tar.gz (or .tar.gzip), introduced because early DOS/Windows filesystems limited extensions to three characters. The bytes inside are identical: a tar archive wrapped in gzip. xconvert accepts both extensions and treats them the same. There's a dedicated TGZ to 7Z page for the same conversion under that extension.
Can I password-protect the resulting 7z?
Not from this online tool — xconvert's defaults produce an unencrypted .7z so the file works in any archiver without prompting. If you need AES-256 encryption with a passphrase, download the output and run 7z a -p archive.7z files/ from the 7-Zip CLI, or use the desktop 7-Zip GUI's "Encrypt" panel. The 7z format itself supports AES-256 with SHA-256 key stretching (524,288 iterations per the format spec) and optional filename encryption.
Why is LZMA2 slower than gzip? Is it worth it?
LZMA2 uses a much larger sliding dictionary (up to 4 GB vs gzip's 32 KiB) and range coding instead of Huffman coding, which lets it model and compress longer-range patterns at the cost of more CPU and RAM. Compression is typically 2–5× slower than gzip at comparable settings; decompression is slower than gzip but usually faster than bzip2. For one-time archives you keep for a long time, the trade is clearly worth it — you spend CPU once at pack time and save bandwidth or storage forever after.
Does converting .tar.gz to .7z re-compress, or just re-wrap?
It re-compresses. The conversion decompresses the gzip layer, reads the tar's file list, and re-encodes the contents through LZMA2 into a 7z container. That's why the output is smaller (or larger, for already-compressed payloads) — you're not just renaming a container, you're running the bytes through a different algorithm. Lossless in both directions: extract the 7z and you get exactly the files that were inside the tarball.
What's the file-size limit on xconvert?
Free uploads are limited to 400 MB per file (paid plans raise the cap); processing happens on our servers and files are deleted automatically after a few hours. If your tarball is larger than that — multi-gigabyte database dumps or game-asset bundles — split it locally first (split -b 350M archive.tar.gz archive.tar.gz.), convert each part, or run 7z against the original on your own machine. No account is required, no watermark is added, and there is no Pro tier gating the conversion itself.
When should I just stick with .tar.gz?
When you're distributing Unix source code, building CI artefacts, or backing up a Linux filesystem where preserving file permissions, ownership, and symlinks matters. .tar.gz is universally available (no extra software install on any Unix system), streams natively through tar | gzip pipelines, and the metadata loss of .7z is a real cost. Use .7z when ratio, encryption, or Windows-first sharing wins out; stick with .tar.gz (or step up to .tar.xz for the same LZMA2 gain without losing metadata) when the Unix ecosystem matters.