.img

What is a .img file?

Raw Disk Image · Disk image · Various · n/a

An .img file is usually a raw, byte-for-byte copy of a disk or memory card, with no compression or extra structure. It is how operating-system images for devices like the Raspberry Pi are distributed.

Category
Disk image
Type
Binary
Is a .img file safe to open? Caution when writing. Flashing an .img overwrites the entire target disk, so double-check the destination drive. Only flash images from sources you trust.

What is a .img file used for?

Because a raw .img mirrors a disk exactly, it has no header of its own; its first bytes are whatever was on the disk (often a boot sector or partition table). This is why there is no single magic number.

You write an .img to an SD card or USB stick to clone the disk, using a tool like balenaEtcher or Raspberry Pi Imager. Some .img files are instead old floppy or CD images.

How to open a .img file

The .img format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list. For a step-by-step walkthrough, see how to open a .img file.

Windows

  • balenaEtcher
  • Rufus
  • 7-Zip (some images)

macOS

  • balenaEtcher
  • Disk Utility
  • dd

Linux

  • balenaEtcher
  • dd
  • GNOME Disks

How to convert a .img file

You can convert a .img file to iso, vhd, vmdk using a conversion tool or the export menu of an app that opens it.

.img file signature (magic bytes)

Programs recognise a .img file by the bytes at the start of the file, not by its name. These are the signatures for IMG.

Hex signatureOffsetNote
(no fixed signature)0no fixed signature; a raw byte-for-byte copy of a disk

See the full magic-numbers reference for every format.

Frequently asked questions

What is a .img file?

An .img file is usually a raw, byte-for-byte copy of a disk or memory card, with no compression or extra structure. It is how operating-system images for devices like the Raspberry Pi are distributed.

How do I open an .img file?

To write it to an SD card or USB, use balenaEtcher or Raspberry Pi Imager. To browse its files, mount it or open some images in 7-Zip.

What is the difference between IMG and ISO?

Both are disk images. ISO follows the optical-disc ISO 9660 standard; a raw .img is a plain byte copy of any disk, common for SD cards and drives.

How do I write an .img to an SD card?

Use balenaEtcher or Raspberry Pi Imager: select the .img, pick the card, and flash. This erases the card, so back it up first.

Related formats

Sources

Details on this page were checked against authoritative references: