How to Convert DMG Images to ISO Easily with hdiutil

Mar 28, 2007 - 21 Comments

Finder of Mac OS X 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.

ISO

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.

.

Related articles:

Posted by: Paul Horowitz in How to, Mac OS, Tips & Tricks

21 Comments

» Comments RSS Feed

  1. […] 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 […]

  2. […] 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. […]

  3. Ashley H says:

    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.

  4. kaikaikai says:

    amazing!
    another reason the love the mac

    • computers_suck says:

      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’.

  5. Tim says:

    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?

    • Afonso says:

      are you putting directory path to where the .dmg file is? ex: Users/mac/Desktop/imagefile.dmg

      • the digitalmouse says:

        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’

  6. Amorim says:

    Great Idea… work fine to me.

  7. Dan says:

    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

  8. rou says:

    This didn’t work when trying to c onvert a 8gig DVD-dl image. Said “hdiutil: convert failed – image/device is too large”

  9. Ben says:

    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.

  10. Ben says:

    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.

  11. yopy says:

    Does that work with a boot mac CD?

  12. Frank says:

    @anon, not all new macs have an dvd burner, and not all dvd burners have dual layer

  13. phummers says:

    @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?

  14. anon says:

    just burn it on your mac, every new mac comes with a burner anyway

    you can burn iso on mac too

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site