Convert GZ to IMG
Extract compressed GZ disk images into IMG files for imaging tools and virtual machines.
Convert GZ files online
We don’t have a dedicated online converter for GZ to IMG yet, but you can convert GZ files online to these formats:
Want to convert GZ to IMG?
Let us know. We pick the conversions to add next by how many people ask for them.
How to convert gz to img file
- Archives
- No ratings yet.
A device-imaging program, virtual machine, or bootable-media tool may require an .img file instead of a compressed .gz download. In most cases, this is decompression rather than a change of disk-image format: the original IMG bytes are restored without alteration.
What the GZ format is
GZ is a gzip compression format used widely on Linux and other Unix-like systems. Gzip compresses one file, so image.img.gz normally contains one raw IMG file, while archive.tar.gz contains a TAR archive whose contents have been compressed with gzip.
Linux distributions, Raspberry Pi and other embedded-device projects, Unix backups, source packages, and command-line tools commonly distribute files as GZ or TAR.GZ. The .gz extension identifies the compression layer, not the type of data inside it.
What the IMG format is
IMG usually means a raw disk or removable-media image: a sector-by-sector copy of a floppy disk, hard disk, partition, CD/DVD, USB device, or filesystem volume. Imaging software such as Raspberry Pi Imager, balenaEtcher, Win32 Disk Imager, dd, and some virtual-machine applications can write or mount compatible IMG files.
IMG has no single required internal layout. An image can contain FAT, ext4, a partition table, optical-disc data, or another filesystem, and its extension alone does not identify that layout. Raw IMG files preserve filesystem structures and unused sectors and can be written directly to compatible media, but they are usually much larger than their compressed GZ versions.
Extract a compressed IMG
Linux or macOS: use the built-in gzip utility:
gzip -dk image.img.gz
This creates image.img and keeps the original GZ file. Use gunzip image.img.gz or gzip -d image.img.gz when the compressed source can be removed. To choose the output name explicitly, use:
gzip -dc image.img.gz > image.img
Check the compressed file before extraction with gzip -t image.img.gz. Make sure the destination has enough free space for the uncompressed image; a small download can expand to many gigabytes.
Windows: install 7-Zip from 7-zip.org, right-click image.img.gz, and select 7-Zip → Extract Here or 7-Zip → Extract to image\. The resulting .img file can then be opened by the imaging or virtual-machine software. Do not extract the IMG again when the destination program expects a disk-image file. Keka provides a similar desktop interface on macOS.
Handle a TAR.GZ source
A file named archive.tar.gz is not necessarily an IMG. On Linux or macOS, extract it with:
tar -xzf archive.tar.gz
7-Zip can extract it in two stages on Windows. This produces the files stored in the TAR archive; it produces an IMG only if the TAR already contains one. Building an IMG from ordinary extracted files requires a separate filesystem-image workflow, such as creating a filesystem with an appropriate tool and copying the files into it. Renaming a GZ or TAR file to .img does not create a valid disk image.
Online converters and desktop alternatives
Services such as CloudConvert and Convertio may accept small GZ files, but support for raw disk-image payloads varies. They may return the decompressed payload rather than a specially converted IMG, and uploading boot media, backups, or private data creates a privacy and size risk. Use an online service only for a non-sensitive, small file after confirming that the input contains an IMG; 7-Zip or the local gzip utility is more suitable for disk images.
Write or verify the restored image
After extraction, open image.img directly in the required imaging application. On Linux, a command such as dd if=image.img of=/dev/sdX bs=4M status=progress conv=fsync writes it to a device, but /dev/sdX must be replaced with the correct whole-disk identifier. Selecting the wrong device can overwrite the operating system or personal data; unmount its partitions first where required. Dedicated imaging applications reduce device-selection errors.
Gzip decompression is lossless, so the restored IMG should contain exactly the bytes stored before compression. Compare a checksum supplied for the uncompressed image with sha256sum image.img on Linux or Get-FileHash image.img -Algorithm SHA256 in PowerShell. A checksum published for the .gz file cannot be compared directly with the extracted IMG.
Information about file extensions and file types is provided by File-Extensions.org
The database currently does not contain any direct gz file converter links.