How to Password Protect Files or Folders On Your Mac

Posted in Apple News, How To, Mac, OS X on 15/07/2012 by J. Glenn Künzler


We all have secrets. Some of us keep those secrets on our Macs – but how do you keep prying eyes away from those secrets? Locking your Mac with a password can help. But what if you use a shared or Family computer? What if you need to share a file with someone, but don’t want it falling into the wrong hands?

Fortunately, Apple has provided a way to password protect certain files and folders no matter what your situation might be. Here’s how it’s done.

How To Password Protect a Folder

  1. Fire up Disk Utility
  2. From the File menu, select New, and then select Disk Image from Folder…
  3. Select which folder you would like to protect. choose a folder to protect
  4. Choose the “AES-128″ encryption option (or 256-bit for extra security), and press Save
  5. Enter your desired new password twice – make sure you don’t forget it!

If the files you want to protect aren’t all in one certain folder, or if you want to add more files and folders over time, then instead of selecting “Disk Image from Folder…” in step 2, select Blank Disk Image… Then, set a size limit for how large the protected disk image can be. Name your disk image, choose 128 or 256-bit encryption, and you’re done!

For added security, uncheck the “add password to keychain” box. Also, remember to eject the disk image as soon as you are done with it – otherwise others will be able to access your newly-protected files!

  • Pingback: How to Create a Hidden Folder in OS X | MacTrast()

  • BoozeBaron

    Maybe I’m braindead (quite possible) but this does not work – nor are your screenshots matched with your ‘steps’ …

    I created a “test” folder on my desktop, ran thru your ‘steps’ and it created a .dmg image file right below the dummy test folder (which had random misc files in it) … Even though it was password protected – I was still able to click on either, and it popped open (without a password) for all to see… (mounted, or not) .. 🙁

    FWIW – Your image above, shows the option for “New Blank Image” (not folder) … so that too is a bit confusing …

    Either way, am still looking for a way to ‘lock’ folders on my Mac desktop –

    Cheers –

    • It does work. The DMG is the container that provides the password protection – anything you want protected needs to be included in the DMG file.

  • pat

    i don’t understand the last bit: “Also, remember to eject the disk image as soon as you are done with it – otherwise others will be able to access your newly-protected files!”
    what’s all that about???

    • You have to eject it – just like a USB flash drive. The password protection works when opening the disk image. If it’s already open, then password protection isn’t active.

      • Howard

        does not ejecting a disk image throw it away?
        If there’s stuff on there you need, won’t trashing it loose all your stuff?
        e.g.: protecting 10 yrs of tax returns, if I eject the disk image containing all those folders, how will I get them back to open for future use?

        • Rinnko

          it doesn’t, think of it as ejecting your usb drive. Everytime you open it, you’re gonna need to eject it.

  • D Fairy GodSister

    I just used this; had to do 256 though because I didn’t need the password when I tried the 128 bit one, then again, maybe I did it wrong! Thank you very much!

  • majed

    how about the partition. leave it as cd/dvd or could i choose hard disk or no partition map. could u tell me the differences. 🙂

  • Fran

    I can’t fire up disk utility. The message I get is that I can’t use the disk utility I have with my current OSX. (Disk utility 13; OSX 10.9.1)

  • woofin

    i believe this slows down the computer. Apple should create an easier more direct way to password protect certain files.

  • Pingback: How to Create a Hidden Folder in OS X | MacTrast()

  • OccasionalOpiner

    How does a person reverse this?


J. Glenn Künzler

Glenn is Managing Editor at MacTrast, and has been using a Mac since he bought his first MacBook Pro in 2006. Now he’s up to his neck in Apple, and owns an old iBook, a 2012 iMac with an extra Thunderbolt display for good measure, a 4th-generation iPad, an iPad mini, 2 iPhones, and a Mac Mini that lives at the neighbor’s house. He lives in a small town in Utah, enjoys bacon more than you can possibly imagine, and is severely addicted to pie.