How to Password Protect Files on Mac (2026)

Mahesh Makvana
·
6 min read

Switching to Mac is reader-supported. We may earn a commission when you buy through links on our site. Learn more.

Mac has solid built-in tools for protecting files, worth a look before reaching for anything from the App Store.

The right tool depends on what you’re protecting:

These instructions use macOS Sequoia; newer macOS versions may use different labels. Recovery depends on the tool: a forgotten disk-image password can lock you out permanently, while FileVault offers an account-based recovery option or a recovery key. Notes can use your Mac login password or a separate custom password. Set up a password manager and save the password there before you lock anything.

Password-Protect a Folder with Disk Utility

This is the workhorse option. Disk Utility creates an encrypted disk image, a .dmg file that mounts as a drive when you open it and locks itself when you eject it. You choose the encryption option while creating it.

Put all the files you want to protect into a single folder first. That folder is your source.

  1. Open Disk Utility, Cmd + Space, type “Disk Utility”, press Return.
  2. Go to File > New Image > Image from Folder.
Disk Utility with the File menu open, showing New Image submenu expanded and Image from Folder option highlighted
  1. Select your source folder and click Choose.
  2. In the dialog that appears, give the image a name and choose a save location.
  3. Open the Encryption dropdown and select 128-bit AES encryption (recommended). (256-bit AES is available too, stronger and slightly slower on older hardware.)
Disk Utility Save As dialog with the Encryption dropdown open and 128-bit AES encryption (recommended) highlighted
  1. A password dialog appears. Enter and confirm your password, then click Choose.
Disk Utility Create Password dialog with the password and verify fields filled in and the Choose button visible
  1. Back in the main dialog, set Image Format to read/write. This lets you add files to the image later; choosing compressed or read-only locks the contents at creation time.
Disk Utility Save As dialog with the Image Format dropdown open and read/write option highlighted
  1. Click Save. The encrypted .dmg appears at the location you chose.

The original folder stays where it is. Disk Utility copies, it doesn’t move. Once you’ve confirmed the image opens correctly, securely delete the originals from your Mac.

Opening Your Encrypted Disk Image

Double-click the .dmg in Finder. macOS prompts for the password.

macOS asks for the password to open PrivateFiles.dmg.

Enter it and click OK. The image mounts as a drive in Finder. You can open, edit, and add files normally.

When you’re done, right-click the mounted image in the Finder sidebar and select Eject. It relocks immediately.

Finder sidebar showing a mounted encrypted disk image with the right-click context menu open and Eject highlighted

Keep a backup of the encrypted image. Deleting it also removes your copy of everything stored inside it.

Password-Protect Files Using Terminal

A Terminal ZIP archive can be useful for basic password protection when sharing across platforms, but the traditional encryption used by zip -e is weak. Do not use this method for sensitive files; use a modern encrypted sharing method agreed with the recipient. Extraction support depends on the recipient’s app.

  1. Open Terminal, Cmd + Space, type “Terminal”, press Return.
  2. Run this command. Replace destination with the full path and filename for your ZIP (include .zip), and source with the folder you want to protect:
zip -er destination source
Terminal window with the zip -er command entered, showing a destination path and source folder path as arguments
  1. Terminal asks for a password. Type it and press Return. Nothing appears on screen while you type; that’s by design.
Terminal prompts for a password after the zip -er command.
  1. Type the password again to confirm, then press Return.
Terminal window showing "Verify password:" prompt with cursor ready for input

The folder’s contents are now compressed and password-protected inside the ZIP.

Opening a Password-Protected ZIP

Double-clicking the ZIP in Finder prompts for the password via Archive Utility.

Archive Utility requests the password for PrivateFiles.zip.

If Archive Utility skips the prompt and fails silently, a known annoyance, use Terminal instead:

unzip lock.zip

Replace lock.zip with your filename. Terminal handles the password prompt correctly.

Terminal window showing the unzip command run on an encrypted ZIP file, with "Enter password:" prompt visible below the command

Lock a Note in Notes

For text-based content like private journal entries, credentials, or anything note-shaped, the Notes app’s lock feature is faster than Disk Utility and nicely done. Macs with Touch ID can unlock a note without typing anything.

  1. Open Notes and select the note you want to lock.
  2. Click the Lock button in the toolbar and choose Lock Note in macOS Sequoia. Menu placement varies on newer macOS versions.
The Lock button menu in Notes shows Lock Note for the selected note.
  1. Set a password if prompted, or confirm with Touch ID.

To manage your lock settings later, go to Notes > Settings on Mac. You can choose your Mac login password or a separate custom password. If you use a custom password, store it safely: resetting that password does not unlock notes protected by the old one.

Protect the Whole Mac with FileVault

The three methods above protect specific files or content. FileVault encrypts the entire Mac storage volume. Without your login password, the drive is unreadable, even if someone physically removes it from the machine.

On Macs with Apple Silicon or an Apple T2 Security Chip, storage is already encrypted at the hardware level. FileVault adds the authentication gate on top, which is why Apple recommends enabling it regardless of your chip.

Go to Apple menu > System Settings > Privacy & Security, scroll to FileVault, and click Turn On.

FileVault settings show the Turn On button in Privacy & Security.

macOS offers an account-based recovery option or a recovery key. If you choose a key, keep a copy somewhere other than the encrypted startup disk. If you cannot reset your login password and also lose the recovery key, you can lose access to the drive.

Other Options Worth Knowing

For encrypted folders that sync to cloud storage, Cryptomator encrypts files locally before they leave your Mac, which is useful when Disk Utility images don’t play well with iCloud Drive or Dropbox. VeraCrypt covers heavier cross-platform use cases and is open-source.

For protecting files stored on an encrypted external SSD or USB flash drive, Disk Utility can format the drive with encryption built in. The catch: it erases the drive first, so back everything up before you start.

Troubleshooting

Forgot the password for your encrypted disk image or locked note. A disk image requires its password. A note locked with a custom password may still open with Touch ID if you enabled it, but resetting the custom password does not recover old locked notes. Notes using your Mac login password follow that authentication method instead.

The original files are still on my Mac after creating the encrypted image. Correct. Disk Utility copies the folder contents, it doesn’t move them. Delete the originals manually once you’ve confirmed the image works.

Archive Utility doesn’t ask for a password when I open the ZIP. This is a long-standing issue with macOS’s built-in extractor. Use unzip lock.zip in Terminal; it prompts correctly.

Do I need FileVault on an Apple Silicon Mac? Hardware encryption is on by default, but FileVault still matters; it adds the login-password gate. Without it, a determined attacker with physical access has more options. Turn it on.

Disk Utility’s encrypted disk images are the right pick for most file-protection situations, a genuinely clever use of a tool that ships on every Mac. The Terminal ZIP method provides only basic password protection and should not be used to share sensitive files. Notes Lock and FileVault each fill their own corner, and none of this requires anything from the App Store.

If anything sensitive is at stake, combine file-level encryption with FileVault enabled. That setup is meaningfully harder to crack than either one alone.