Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Password Protect Files & Folders in Mac OS X

· 5 min read · Home Tech

In this article
  1. Why Password Protection Matters on a Mac
  2. Method 1: Create an Encrypted Disk Image (Folder)
  3. Method 2: Encrypt a Single File with Pages, Numbers, or Keynote
  4. Method 3: Use a Third-Party App (When You Need More)
  5. How to Choose the Right Method
  6. Common Problems and How to Fix Them
  7. Safety Tips for Password-Protected Folders
  8. Alternatives: FileVault and Full-Disk Encryption
  9. Frequently Asked Questions

Yes, you can password protect files and folders in macOS using built-in tools like Disk Utility and Finder, without needing third-party software. This guide shows you the exact steps to encrypt a folder into a password-protected disk image, and how to lock individual files with built-in encryption.

Why Password Protection Matters on a Mac

macOS already offers full-disk encryption through FileVault, which scrambles everything on your startup drive. But FileVault only protects your data when the Mac is turned off. Once you log in, any file on that drive is readable by anyone who has access to your user account. If you share a computer, lend your laptop, or send files over email, a password-protected folder gives you an extra layer of control. It also lets you encrypt just a few sensitive items—like tax documents, medical records, or client contracts—without encrypting your entire drive.

Method 1: Create an Encrypted Disk Image (Folder)

Disk Utility can create a sparse disk image—a single file that acts like a folder. You can mount it, add files, and unmount it. When unmounted, the image is encrypted and requires a password to open.

  1. Open Disk Utility (in Applications > Utilities).
  2. Go to File > New Image > Blank Image.
  3. Name the image (e.g., “PrivateFiles”).
  4. Set Size to something larger than what you need (you can’t easily expand it later).
  5. Choose Format as “Mac OS Extended (Journaled)” or “APFS” (depending on your macOS version).
  6. Set Encryption to “128-bit AES” (faster) or “256-bit AES” (stronger).
  7. Create a strong password and save it in your keychain if you want automatic access.
  8. Click Save – the image is created as a .dmg file.

Double-click the .dmg to mount it, drag files in, then eject it (right-click > Eject). Now the .dmg is password-protected. To open it again, you’ll be prompted for the password.

Method 2: Encrypt a Single File with Pages, Numbers, or Keynote

Apple’s iWork apps let you encrypt individual documents without creating a disk image.

  1. Open the file in Pages, Numbers, or Keynote.
  2. Go to File > Set Password (or File > Password on older versions).
  3. Enter a password and a hint (optional).
  4. Click Set Password.

The file is now encrypted. Anyone who opens it must enter the password. This works only for files created in these apps—not for Word documents, PDFs, or images.

Method 3: Use a Third-Party App (When You Need More)

If you need to password-protect an existing folder without creating a disk image, or you want to encrypt files of any type, third-party tools like Encrypto or Keka are popular options. These apps let you drag a folder onto them, set a password, and get an encrypted file or archive. They’re free or low-cost, but they rely on the app’s encryption format—so the recipient needs the same app to decrypt. For personal use, the built-in Disk Utility method is more universal because macOS can open .dmg files natively.

How to Choose the Right Method

  • Need to store many files? Use an encrypted disk image – it behaves like a folder.
  • Just one document? Use the built-in password feature in Pages/Numbers/Keynote.
  • Need to share with someone on Windows? Use an encrypted ZIP (via Keka) or a PDF password (via Preview).
  • Need to encrypt an existing folder without copying files? Third-party apps are easier.

Common Problems and How to Fix Them

  • Forgot the password? There is no recovery. If you lose it, the data is unrecoverable. Always store passwords in a password manager.
  • Disk image won’t mount? Check that the .dmg file isn’t corrupted. Try copying it to another location first.
  • Image is full? You can’t resize a sparse image easily. Create a new, larger one and copy files over.
  • Encryption is slow? 128-bit AES is plenty for most users and is faster than 256-bit.

Safety Tips for Password-Protected Folders

  • Use a password that is at least 12 characters long, with a mix of letters, numbers, and symbols.
  • Never write the password on a sticky note near your Mac.
  • Back up the .dmg file along with your other data. If the .dmg is lost, the encrypted contents are gone.
  • If you save the password in your keychain, anyone who can log into your Mac can open the image without typing the password. For maximum security, don’t store it in the keychain.

Alternatives: FileVault and Full-Disk Encryption

FileVault encrypts your entire startup disk. It’s the strongest protection for your whole system, but it doesn’t help if you want to share a single folder with someone else. For selective protection, the disk image method is the standard. Another alternative is to use Finder to create an encrypted folder via the File > Compress option—but that only creates a ZIP, not encrypted. For true encryption, you must use Disk Utility or a third-party tool.

Frequently Asked Questions

Can I password protect a folder without creating a disk image?

Not directly in macOS. The built-in method always creates a .dmg file. If you want to protect an existing folder in place, you’ll need a third-party app like Encrypto or Keka.

Is the encryption strong enough?

Yes, AES-128 and AES-256 are industry-standard and considered secure. Apple uses the same encryption in FileVault.

Can I open the .dmg on a Windows PC?

Windows cannot natively open .dmg files. You’d need third-party software like 7-Zip (which can extract but not decrypt AES-encrypted DMGs easily) or convert the image to a different format. For cross-platform sharing, use an encrypted ZIP instead.

What happens if I forget the password?

There is no backdoor. The data is irretrievable. That’s why you should always keep a copy of the password in a password manager.

Does password protecting a file slow down my Mac?

No. The encryption only happens when you mount the image or open the file. Once it’s open, it works at normal speed.

Can I password protect a folder that’s already in iCloud Drive?

Yes, you can create the encrypted .dmg and store it in iCloud Drive. The .dmg itself is encrypted, so even if someone accesses your iCloud files, they can’t open it without the password.