Convert TGZ to TAR — Free Online Converter
Convert Gzipped Tar Archive (.tgz) to Tape Archive (.tar) online for free. Fast, secure archive conversion with no watermarks or registration.
安全传输
HTTPS 加密上传
隐私优先
文件处理后自动删除
无需注册
即刻开始转换
随处可用
任何浏览器,任何设备
如何转换
Upload your .tgz 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.
关于TGZ转TAR
TGZ is a gzip-compressed tar archive using the short .tgz extension common in Slackware packages, Helm charts, and embedded build systems. TAR is the underlying uncompressed archival format — stripping the gzip layer from a .tgz produces the raw tar stream containing all files and metadata.
Converting TGZ to TAR decompresses the gzip layer to expose the uncompressed tar archive inside. This is equivalent to running `gunzip archive.tgz` and is useful when you need the raw tar for compression algorithm substitution, Docker layer operations, tar entry manipulation, or feeding into tools that require uncompressed tar input.
为什么要将TGZ转换为TAR?
Slackware package developers and maintainers sometimes need the uncompressed tar to inspect or modify package entries (install scripts, file permissions, directory layout) before recompressing. Helm chart developers may need to unpack, modify Chart.yaml or templates, and repackage. Direct tar manipulation is simpler without the gzip compression layer in the way.
Docker's build system and container layer management operate on uncompressed tar streams internally. Feeding raw .tar into Docker operations avoids redundant decompression. Similarly, switching to a different compressor (xz for Slackware's newer .txz format, zstd for faster decompression) requires the plain tar as an intermediate stage.
常见使用场景
- Unpacking Slackware .tgz packages for modification of install scripts or file layouts before repackaging
- Preparing Helm chart .tgz files for template editing and repackaging after modifications
- Converting .tgz to .tar as a step toward .txz (tar + xz) format for Slackware 15.0+ packages
- Feeding raw tar streams into Docker layer operations that work on uncompressed tar data
- Enabling direct manipulation of tar entries (header edits, file replacement) without gzip overhead
工作原理
The gzip header is read and validated (magic bytes 1f8b, DEFLATE method), the compressed data stream is decompressed, and the CRC32 checksum in the gzip trailer is verified against the decompressed data. The output is the raw tar byte stream — the exact bytes that were gzip-compressed inside the .tgz. No tar parsing or modification occurs during this operation. The output size equals the original uncompressed size stored in the gzip footer.
质量与性能
Perfectly lossless. Gzip decompression is deterministic and mathematically reversible. The output .tar is the exact byte stream that was originally compressed, verified by the CRC32 checksum. All tar entries, file data, permissions, timestamps, and directory structure are preserved identically.
设备兼容性
| Device | TGZ | TAR |
|---|---|---|
| Windows PC | Partial | Partial |
| macOS | Partial | Partial |
| iPhone/iPad | Partial | Partial |
| Android | Partial | Partial |
| Linux | Partial | Partial |
| Web Browser | No | No |
获得最佳效果的技巧
- 1Ensure sufficient disk space for the uncompressed tar — Slackware packages and Helm charts can be significantly larger when uncompressed
- 2For upgrading .tgz to .txz (Slackware 15.0+), pipe through xz compression after decompression: this avoids writing the intermediate tar to disk
- 3Use `tar -tf archive.tar` to inspect the package structure without extracting files
- 4For Helm chart editing, extract the tar after decompression, modify templates/values.yaml, then repackage
- 5Gzip decompression is I/O-bound on modern hardware — SSD storage significantly speeds up the process for large packages
相关转换
TGZ to TAR decompresses the gzip layer from a .tgz package, producing the raw tar for package editing, compression algorithm substitution, or Docker layer operations.
TGZ 与 TAR 对比
| 特性 | TGZ | TAR |
|---|---|---|
| 全称 | Gzipped Tar Archive | Tape Archive |
| 扩展名 | .tgz | .tar |
| 最适合 | TAR + gzip | Unix permissions |