Convert GZ to TAR — Free Online Converter
Convert Gzip Compressed Archive (.gz) to Tape Archive (.tar) online for free. Fast, secure archive conversion with no watermarks or registration.
Saker overforing
HTTPS-krypterade uppladdningar
Integritet forst
Filer raderas automatiskt efter bearbetning
Ingen registrering
Borja konvertera direkt
Fungerar overallt
Valfri webblasare, valfri enhet
Hur man konverterar
Upload your .gz file by dragging it into the upload area or clicking to browse.
Choose your output settings. The default settings work great for most files.
Click Convert and download your .tar file when it's ready.
Om konvertering från GZ till TAR
GZ is a single-file compression format using the DEFLATE algorithm, part of the GNU project and installed by default on every Unix-like system. TAR (Tape Archive) is the foundational Unix archival format that bundles files and directories into a single uncompressed stream, preserving file permissions, ownership, timestamps, and symbolic links.
Converting GZ to TAR decompresses the gzip layer to produce the underlying data. In most real-world scenarios, .gz files actually contain a tar archive (.tar.gz or .tgz), so this conversion effectively strips the compression to expose the raw tarball. For standalone .gz files wrapping a single file, the conversion wraps the decompressed output in a TAR container for consistent output format.
Varför konvertera GZ till TAR?
Removing gzip compression from a .tar.gz produces a plain TAR file that is useful in several scenarios. Docker's build cache works more efficiently with uncompressed tar layers since it can diff and deduplicate content. Some build systems and deployment scripts expect plain tar input that they will compress with their own preferred method (bzip2, xz, zstd). Debugging archive contents is easier with uncompressed tar since you can inspect raw file boundaries.
Plain TAR files also allow random access to individual file entries without decompressing the entire archive. While gzip requires sequential decompression from the beginning, tar's index-like central directory allows tools to seek directly to specific files — valuable when working with large archives containing many small files.
Vanliga användningsområden
- Extracting the raw tar archive from a .tar.gz for use in Docker layer operations
- Preparing uncompressed archives for subsequent compression with a different algorithm (bzip2, xz, zstd)
- Debugging tar archive contents by removing the compression layer for raw inspection
- Feeding plain tar streams into build systems that handle their own compression
- Working with archival tools that require uncompressed tar input for indexing or cataloging
Så fungerar det
The conversion reads the gzip stream header (magic bytes 1f8b), decompresses the DEFLATE data, and verifies the CRC32 checksum and original size footer. If the decompressed content is already a valid tar archive (detected by the tar magic bytes at offset 257), it is output directly as the .tar result. If the GZ wraps a non-tar file, the decompressed content is wrapped in a new POSIX tar archive with a single entry preserving the original filename. The output is uncompressed — file sizes will increase proportional to the original compression ratio.
Kvalitet & prestanda
Fully lossless. Gzip decompression is a deterministic, reversible process. The decompressed data is identical to what was originally compressed, verified by the CRC32 checksum embedded in every gzip stream. If the GZ contains a tar archive, that tar is preserved byte-for-byte. No file content is modified.
Enhetskompatibilitet
| Device | GZ | TAR |
|---|---|---|
| Windows PC | Partial | Partial |
| macOS | Partial | Partial |
| iPhone/iPad | Partial | Partial |
| Android | Partial | Partial |
| Linux | Partial | Partial |
| Web Browser | No | No |
Tips för bästa resultat
- 1If your goal is to switch compression algorithms, decompress to .tar first, then apply the new compressor — do not double-compress
- 2Ensure sufficient disk space before converting — the uncompressed tar can be 2-10x larger than the gzip input
- 3Use `tar -tf output.tar` to verify the file listing matches what you expect from the original .gz archive
- 4For Docker layer optimization, uncompressed tar streams are often preferable since Docker applies its own compression
- 5If you only need to read one file from a .tar.gz, most tools can extract specific entries without producing the full uncompressed tar
Relaterade konverteringar
GZ to TAR conversion removes gzip compression to expose the underlying tar archive or wraps single files in tar format. Useful for Docker operations, build system integration, and applying alternative compression methods.
GZ vs TAR
| Funktion | GZ | TAR |
|---|---|---|
| Fullstandigt namn | Gzip Compressed File | Tape Archive |
| Filandelse | .gz | .tar |
| Bast for | DEFLATE compression | Unix permissions |