How to Convert DMG Images to ISO Easily with hdiutil
If you have ever wanted to turn a DMG file into an ISO file, look no further than the handy command line utility called hdiutil, which is bundled in all versions of OS X. This can be helpful for many reasons, but one of the primary reasons to convert a DMG to ISO is for compatibility. Perhaps your Mac doesn’t have a writable media drive, or it’s not up to speed, or the multitude of other reasons you’d want to have or burn an ISO from a PC rather than a DMG on your Mac.
Forget downloading the shareware apps that promise to convert DMG files to ISO, you can do it right from Mac OS X’s command line, for free, using the hdiutil command as outlined below.
The syntax to enter into the Terminal is as follows:
hdiutil convert imagefile.dmg -format UDTO -o imagefile.iso
This will actually create a file called imagefile.iso.cdr in the current directory, but you can replace the image files with their appropriate paths and a target destination, for example:
hdiutil convert ~/Downloads/Installer.dmg -format UDTO -o ~/Desktop/Installer.iso
You may notice the output includes a ‘.cdr’ extension on the iso file, but you’ll want to change that to just .iso, this is easily done with the mv command as follows:
mv imagefile.iso.cdr imagefile.iso
That’s all there is to it, now your DMG image file is an ISO, and it can be copied, burned, or used on any Mac or any PC with the proper hardware.
By the way, if you’re not much of a command line user, you can perform disk image conversions from cdr, dmg, and iso, with Disk Utility, which is a GUI app bundled with all versions of OS X and all Macs.
[…] tools, all you need for conversion is built right into Mac OS X and you don’t even have to go the command line route for most […]
[…] When finished you’ll have an exact replica of the Macs hard drive in the form of a .dmg image file. If you intend on using the image on a Windows PC, you may want to convert it to an .iso first. […]
I never realized .cdr was equivalent to .iso. In that case, you can actually use Disk Utility to convert the image (just use the ‘convert’ button) to a “CD/DVD Master”. That will append .cdr to the filename – simply rename it to .iso and you’re good to go.
amazing!
another reason the love the mac
Not to offend, but .dmg files are proprietary and Mac specific, so its not ‘another reason to love the mac’, it’s ‘another format we have to convert to get any kind of unanimity among platforms…great’.
Am I missing something? I use the command line specified to enable this and it tells me no such file. I use the name of my Snow Leopard .dmg image instead of imagefile.dmg and it tells me the same thing. What am I doing wrong?
are you putting directory path to where the .dmg file is? ex: Users/mac/Desktop/imagefile.dmg
and don’t forget ‘imagefile’ should be replaced with the actual name of the file… for example:
‘classic_mac_pack.dmg’ would be converted to ‘classic_mac_pack.iso’
[…] https://osxdaily.com/2007/03/28/easily-convert-dmg-images-to-iso/ […]
Great Idea… work fine to me.
I have a copy of Snow Leopard 10.6 but cannot burn it on my iMac since I have no DVD DL burner for starters.
With my WIN XP I tried burning the dmg file with the software TransMac. Doesn´t seem to work though cus my mac just tries to read the disc for then to finally spit it out.
I always use Verbatim DVD DL so the media is not the faulty one
—–
While I was typing this message I tried renaming my uncompressed dmg file to iso and burn it with Nero.
So now I just tried it on my mac and it works!
…but I couldn´t run the install , the message said “cannot be installed on this machine”.
Perhaps cus I only have 256 MB in it and it requires 2GB.
I´ll have to buy more and then I hope it works
This didn’t work when trying to c onvert a 8gig DVD-dl image. Said “hdiutil: convert failed – image/device is too large”
Awesome. This worked perfectly on MacOS 10.5 to convert a dmg to an ISO that would mount with Virtualbox. Great tip. Burning to DVD and then using that would have been a waste.
virtual box can mount DMG files just fine, thats how you can install OSX from a .dmg
Awesome. This worked perfectly on MacOS 10.5 to convert a dmg to an ISO that would mount with Virtualbox. Great tip. Burning to DVD and then using that would have been a waste.
Does that work with a boot mac CD?
@anon, not all new macs have an dvd burner, and not all dvd burners have dual layer
@anon:
“just burn it on your mac, every new mac comes with a burner anyway”
What percentage of Mac users do you think have new Macs?
just burn it on your mac, every new mac comes with a burner anyway
you can burn iso on mac too
except for macbook air of course
what if you don’t have a mac?