How to create a password-protected (encrypted) disk image

An encrypted disk image works just like a regular disk image but requires a password to open and become available (“mount”). You can move files to or from an encrypted disk image as easily as you can from a non-encrypted disk image. Follow these steps to create an encrypted disk image:

  1. Open Disk Utility (located in /Applications/Utilities/).
  2. Click the New Image button, or choose File > New > Blank Disk Image.
  3. Type a name in the Save As field. This name will be used for the disk image (.dmg) file.
  4. Change the save destination if you wish.
  5. Select a size for the disk image file from the Size pop-up menu.
  6. Choose a different volume format if you don’t want to use the default Mac OS X Extended (Journaled).
  7. Choose an image format. You can use “sparse disk image” for a disk image that only uses as much space as it needs, rather than a set amount of space. If you’re not sure, use “read/write disk image” choice.
  8. Choose 128-bit AES encryption (and/or 256-bit AES in Mac OS X v10.5 or later) from the Encryption pop-up menu to encrypt the image’s contents with a password. If you don’t choose an encryption, your new image won’t be encrypted.
  9. Click the Create button.
  10. Enter and verify a good password in the dialog window that appears. This password will be saved in your keychain by default, or you can deselect “Remember password (add to keychain)” if you don’t want it saved. You can store the password in the keychain for convenience.
  11. Click OK.

Important: If you forget the password, data stored in the encrypted disk image cannot be retrieved. If you have saved the password in the keychain, the password will be available to you there.