.dmg — Apple Disk Image
Executable application/x-apple-diskimage
What a .dmg file is
A mountable disk image, the standard way macOS applications are distributed.
How to open it
macOS only — double-click to mount, then drag the app to Applications.
Worth knowing
Eject the mounted image afterwards; a drawer full of mounted DMGs is a very common macOS untidiness.
How to identify a .dmg file
A file's extension is only its name — renaming a.png to a.dmg changes nothing inside. What software actually reads is the magic number, the first few bytes of the file.
| Signature | koly trailer at end of file |
| MIME type | application/x-apple-diskimage |
| Category | Executable |
Unusually, the signature is at the end, not the beginning.
# what is this file really?
file mystery.dmg
# look at the first bytes yourself
xxd mystery.dmg | head -2
head -c 16 mystery.dmg | xxd
# Windows PowerShell
Get-Content mystery.dmg -AsByteStream -TotalCount 16 | Format-Hex
Frequently asked questions
What is a .dmg file?
A mountable disk image, the standard way macOS applications are distributed.
How do I open a .dmg file?
macOS only — double-click to mount, then drag the app to Applications.
Is .dmg safe to open?
No — not from an untrusted source. A .dmg file is executable code, and opening one runs it. Check the digital signature first, and prefer official distribution channels.
Can I change a file's extension to convert it?
No. Renaming changes the label, not the bytes. The one place it appears to work is between formats that genuinely share a container — renaming .docx to .zip works because a DOCX is a ZIP. Everything else needs a real converter.