.dmg

What is a .dmg file?

Apple Disk Image · Disk image · Apple · 2000s

A DMG is the Mac equivalent of an ISO, the standard way Mac apps are downloaded. Double-clicking mounts it as a drive, and you usually drag the app inside to your Applications folder to install it.

Category
Disk image
Type
Binary
Is a .dmg file safe to open? The image is safe to mount, but only install apps from DMGs you downloaded from the developer or a trusted source.

What is a .dmg file used for?

A DMG packages a Mac application or files as a mountable disk image, often with a tidy installer window that says to drag the app into Applications.

It can be compressed and even encrypted, and it preserves Mac-specific file attributes that a plain ZIP would lose.

DMG is Mac-only. On other systems you would need special tools, and there is rarely a reason to open one outside macOS.

The most common question is how to open a DMG on Windows, and the honest answer is that you usually should not need to: a DMG almost always contains a Mac app, which will not run on Windows anyway. 7-Zip can peek inside many DMGs, but to install and use what is in one you need a Mac.

What opens a .dmg file?

The .dmg format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list.

Windows

  • 7-Zip (partial)
  • not natively supported

macOS

  • double-click to mount
  • Disk Utility

Linux

  • 7-Zip (partial)
  • dmg2img

Web

  • Not applicable

Open a .dmg file step by step

  1. Confirm the file really is a .dmg. Drop it into the WhatFileType identifier, which reads its signature in your browser without uploading anything.
  2. On Windows, open it with 7-Zip (partial) or not natively supported.
  3. On Mac, use double-click to mount or Disk Utility.
  4. On Linux, try 7-Zip (partial) or dmg2img.
  5. Still stuck? Convert the .dmg to Mount and install, which opens more widely.

Why can't I open my .dmg file?

Almost always because no installed app understands DMG. Install one of the apps above, or convert the file to a format your existing software already reads. If double-clicking opens the wrong program instead of nothing at all, the file association is set to the wrong app rather than the file being broken.

The other possibility is that the file is not really a .dmg at all. Drop it into the file identifier to check it by its bytes instead of its name. Nothing is uploaded.

How to convert a .dmg file

You can convert a .dmg file to Mount and install.

A DMG is a disk image to mount, not a file to convert. On a Mac, double-click it and drag the app to Applications. There is no meaningful DMG to EXE conversion: the software inside is compiled for macOS.

What is the .dmg file signature (magic bytes)?

A .dmg file ends with the hex bytes 6B 6F 6C 79, 512 bytes from the end, which read as koly in ASCII. Programs identify DMG by those bytes, not by the filename, so a renamed file still gives itself away.

These are the documented signatures for DMG. For a full breakdown, see the Apple Disk Image file signature page.

Documented magic-byte signatures for the .dmg format
Hex signatureOffsetASCIINote
6B 6F 6C 79-512koly'koly' trailer near end of file
6B 6F 6C 79end of filekolykoly trailer, 512 bytes from the end

DMG also ends with a trailer. The bytes 6B 6F 6C 79 appear at the end of the file, so a truncated download is spotted by checking the last bytes as well as the first.

See the full magic-numbers reference for every format.

Frequently asked questions

What is a .dmg file?

A DMG is the Mac equivalent of an ISO, the standard way Mac apps are downloaded. Double-clicking mounts it as a drive, and you usually drag the app inside to your Applications folder to install it.

How do I install an app from a DMG?

Double-click the DMG to mount it, then drag the app icon into your Applications folder. Eject the image when done.

How do I open a DMG file on Windows?

You can peek inside many DMGs with 7-Zip, but a DMG almost always holds a Mac application that will not run on Windows. If you were after a Windows program, look on the vendor's site for a Windows (.exe or .msi) download instead.

Related formats

Sources

Details on this page were checked against authoritative references. How sources are ranked and what is deliberately left out is set out in the methodology.