TechBuzzPro

How to Lock Files and Documents on iPhone and Mac

· 7 min read · Phones & Tablets

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

You cannot put a password on an individual file in the iPhone or Mac Files app, but you can protect documents properly by locking them inside an encrypted container or by using the app that owns the file. On a Mac, the fastest route is to create an encrypted disk image with Disk Utility and store the documents inside it; on iPhone, the practical route is to keep sensitive documents in a password-protected notes app or an encrypted cloud folder, because iOS has no built-in per-file lock. Both approaches are official, free, and reversible.

The steps below cover the Mac disk image method first (the closest thing to a real file lock), then the iPhone options, then what to do when a lock refuses to open. Menu labels can differ slightly by macOS or iOS version, device model, and region, so treat the exact wording as a guide rather than a guarantee.

What You'll Need

  • A Mac running a current version of macOS, with Disk Utility available in Applications > Utilities or via Spotlight.
  • An iPhone with the Files app and, ideally, iCloud Drive or another cloud account signed in.
  • A passphrase you will actually remember, or a password manager to store it. There is no recovery for an encrypted disk image if the password is lost.
  • The documents you want to lock, moved to a location you can find easily.

Step-by-Step

Lock documents on a Mac with an encrypted disk image

  1. Create a folder for the sensitive files, for example on your Desktop, and move the documents into it. Give it a neutral name that does not advertise its contents.
  2. Open Disk Utility (Applications > Utilities > Disk Utility, or search with Spotlight).
  3. Choose File > New Image > Image from Folder, then select the folder you created.
  4. In the save dialog, set the name and location for the image file. Pick 256-bit AES encryption from the encryption menu.
  5. Enter a strong passphrase twice and, if offered, leave the option to remember it in your keychain unticked unless the Mac is yours alone and well protected.
  6. Set Image Format to read/write if you plan to add or edit files later, or read-only if the documents are final and you only need to read them.
  7. Click Save. The disk image is created with a .dmg extension.
  8. Test it: double-click the .dmg, enter the password, confirm the files open, then eject the mounted volume from the Finder sidebar or by right-clicking its desktop icon.
  9. Delete the original unencrypted folder, then empty the Trash. Until you do this, the plain copies still exist.

Lock a single document in a Mac app

  1. Open the document in its own app, such as Pages, Numbers, or Preview for PDFs.
  2. Use File > Set Password (Pages and Numbers) or File > Export as PDF and set a password in the export options for Preview-based workflows.
  3. Enter and verify the password, then save. The app now asks for the password each time the file is opened in that app.
  4. Remember that this protection travels with the app, not the file system: another app may open the same file without asking.

Protect documents on iPhone

  1. Understand the limit first: the Files app has no per-file password. Anything you need locked must live inside an app or container that supports a passcode.
  2. For notes and small documents, use the Notes app: open the note, tap the share or more button, choose Lock Note, and set a password or use Face ID. Locked notes are encrypted and require the passcode to view.
  3. For PDFs and scans, open the file in the Files app, tap it, then use the markup or share options to save it into an app that supports password protection, such as a PDF editor with an export password option.
  4. For a folder of documents, create an encrypted disk image on the Mac as described above, then save the .dmg into iCloud Drive. On iPhone, open Files, tap the .dmg, and enter the password to mount it in a compatible viewer. Support for mounting disk images on iOS varies, so test before relying on it.
  5. Alternatively, keep the documents in an encrypted cloud folder: iCloud Drive with Advanced Data Protection enabled encrypts your data end to end, and third-party cloud apps offer their own vault or locked-folder features. Check the provider's own documentation for the exact option name.
  6. Turn on a strong device passcode and Face ID or Touch ID, since app-level locks inherit the device's security. Go to Settings > Face ID & Passcode to confirm a passcode is set.

Common Mistakes

  • Leaving the original unencrypted folder in place after creating the disk image. The lock is meaningless while a plain copy sits on the Desktop or in the Trash.
  • Choosing no encryption, or 128-bit when 256-bit AES is offered, for documents that genuinely matter.
  • Forgetting the disk image password. There is no reset and no support line that can open it.
  • Assuming a password-protected PDF is safe everywhere. Some viewers ignore the permission flags, and screenshots bypass them entirely.
  • Storing the password in the same folder, in a plain text file, or in a note that is itself unlocked.
  • Believing a locked note protects the attachment previews in the Photos app or in message threads where the file was shared.

Tips

  • Use a passphrase of several unrelated words rather than a short complicated string; it is easier to type and harder to guess.
  • Keep the .dmg in a backed-up location. An encrypted image that exists on one drive only is one failure away from being gone.
  • Set the disk image to read-only once the documents are final, so nobody can alter them even with the password.
  • Name the image something dull. A file called Tax Returns 2024 Encrypted invites attention.
  • Test the lock from a second device or account before you delete the originals.
  • For shared documents, send a password-protected PDF and pass the password through a different channel than the file itself.

Troubleshooting

If the disk image will not mount, first check that you are typing the password with the correct keyboard layout and without Caps Lock. Try copying the password from your password manager instead of typing it. If the image was downloaded, macOS may quarantine it; open it from Finder rather than from a browser preview.

If the password is rejected on a file you created in an app, confirm you are opening it in the same app that set the password. A PDF password set during export will not be requested by every viewer, and some apps silently open a cached copy.

If a locked note on iPhone will not unlock, make sure the device passcode has not changed since the note was locked, and check that you are using the note password rather than the device passcode if you set a separate one. Restart the iPhone, then try again. Do not delete the note to "reset" it, because the content goes with it.

If the .dmg is corrupted or will not open at all, restore it from a backup. This is why the encrypted copy should never be the only copy.

Frequently Asked Questions

Can I password-protect a single file in the iPhone Files app?

No. The Files app has no per-file lock. Use a locked note, an app that exports password-protected files, or an encrypted disk image stored in iCloud Drive.

Is a locked note in Apple Notes really encrypted?

Yes, locked notes are encrypted and require the note password or Face ID to open. The protection applies to the note itself, not to copies you have shared elsewhere.

What happens if I forget the disk image password?

The data is unrecoverable. Apple and third-party tools cannot bypass 256-bit AES encryption on a disk image, so keep the passphrase in a password manager.

Does moving a file to the Trash lock it?

No. The Trash is not encrypted protection. Empty it after you have confirmed the encrypted copy works.

Can I lock a folder on iPhone the same way as on Mac?

Not natively. Create the encrypted folder on the Mac, then store the resulting disk image in iCloud Drive and open it on iPhone with a compatible app.

Is iCloud Drive encrypted?

iCloud data is encrypted in transit and at rest, and Advanced Data Protection extends end-to-end encryption to more categories including iCloud Drive. Enable it in Settings if you need that level of protection.