Updated Nov 27, 2026· 13 min read

Key takeaways

  • This how to encrypt files mac osx review covers FileVault, encrypted disk images and password-protected files, with steps to keep Mac files private and secure.

As an Amazon Associate we earn from qualifying purchases.

To encrypt files on a Mac, turn on FileVault in System Settings under Privacy and Security to encrypt your whole startup disk, or use Disk Utility to create a password-protected encrypted disk image for selected files and folders. For a single document, set a password inside Pages, Numbers or Keynote, or export a PDF from Preview with a password. Each method scrambles your files so they cannot be read without the right password, which keeps private documents safe if your Mac is lost or stolen.

Apple builds all of these tools into macOS, so most people do not need to install anything extra to protect their files. Mac OS X is the older name for the system now called macOS, and the steps here work on recent versions, with menu names noted where older versions differ. This guide walks through each method step by step, explains how to pick the right one for your situation, and covers the mistakes that most often lock people out of their own files.

How to Encrypt Files on a Mac: Step-by-Step Methods

Method 1: Turn on FileVault to encrypt your whole disk

FileVault is the full-disk encryption feature built into macOS. It uses XTS-AES-128 encryption with a 256-bit key to protect the information on your startup disk, according to Apple. Once it is on, nobody can read the contents of your disk without your login password or recovery key, even if the Mac is taken apart and the drive is removed. On Macs with Apple silicon or a T2 security chip, the storage is already encrypted at the hardware level, and turning on FileVault ties that encryption to your login password. On older Intel Macs without a T2 chip, turning it on starts encrypting the drive in the background, which can take several hours if you have a lot of stored files, although you can keep using your Mac while it finishes.

Follow these steps to turn it on:

  1. Click the Apple menu in the top-left corner of the screen, then open System Settings and click Privacy and Security in the left sidebar. On macOS 12 Monterey and earlier, open System Preferences, click Security and Privacy, then click the FileVault tab.
  2. Scroll down to the FileVault section. If FileVault is already on, you are done. If it is off, click Turn On.
  3. If asked, enter your administrator password, then follow the on-screen prompts.
  4. Choose how you want to recover access if you forget your password. You can allow your Apple Account to unlock the disk, or create a recovery key.
  5. If you create a recovery key, macOS shows a 24-character code made of letters and numbers. Write it down and store it somewhere safe, away from your Mac. This key is the only way back in if you forget your login password and cannot use your Apple Account.
  6. If your Mac has more than one user account, follow the prompts to enable each user who should be able to unlock the disk. User accounts added after FileVault is turned on are enabled automatically.

You can check the status at any time in the same place: System Settings, then Privacy and Security, then FileVault. In Terminal, the command fdesetup status reports whether FileVault is on or off. To turn FileVault off again, return to the same screen and click Turn Off, then enter your administrator password. Decryption then runs in the background, and your files stay readable while it works.

Method 2: Create an encrypted disk image with Disk Utility

If you only want to protect a handful of files or folders rather than your whole disk, an encrypted disk image is the right tool. A disk image is a single file, ending in .dmg, that behaves like a separate drive when you open it. When it is encrypted, macOS asks for a password before it mounts, and the contents stay scrambled while the image is closed. Apple documents this method in its Disk Utility support guide, and it works on any Mac with no extra software.

To create an encrypted disk image from a folder:

  1. Open Disk Utility. You will find it in Applications, then Utilities, or press Command and Space, type Disk Utility, and press Return.
  2. In the menu bar, choose File, then New Image, then Image from Folder.
  3. Select the folder you want to protect and click Open.
  4. In the Save As field, type a name for the image, add tags if you like, and choose where to save it, such as Documents.
  5. Click the Encryption pop-up menu and choose an encryption option. Most Macs show 128-bit AES and 256-bit AES. Either is strong for personal files, and 256-bit AES is the stronger choice, although it is a little slower to work with.
  6. Type a password, type it again in the Verify field, and click Choose. Apple warns that if you forget this password, you will not be able to open the disk image or view any of its files, so save the password in the Passwords app or another password manager before you continue.
  7. Click the Image Format pop-up menu. Choose read/write if you want to add or change files inside the image later, or read-only if the contents will not change.
  8. Click Save, then click Done when the operation is complete.

To open the image later, double-click the .dmg file and type the password when asked. Leave the option to remember the password in your keychain turned off if you want the password asked for every time. While the image is mounted, its files work like any other files. To lock it again, eject the mounted image from the Finder sidebar. The original folder stays where it was, so delete it or move it elsewhere if you do not want an unprotected copy left behind.

You can also start from a blank image instead of a folder. In Disk Utility, choose File, then New Image, then Blank Image, and fill in a name, a size, a format, and an encryption option. Apple notes that for a Mac running macOS 10.13 or later, the format should be APFS or APFS (Case-sensitive), while older systems use Mac OS Extended (Journaled). A blank image is useful when you want a private space that grows over time, for example a folder where you keep scans of identity documents as you collect them.

Method 3: Encrypt an external drive or USB stick

External drives and USB sticks are easy to lose, and they often hold backups, photos and work files. macOS lets you encrypt an external drive directly from Finder, without opening Disk Utility. This works for drives formatted for Mac; a drive formatted for Windows will need to be reformatted first, which erases it, so copy its files elsewhere before you start.

Follow these steps:

  1. Plug in the external drive or flash drive.
  2. Open Finder and find the drive in the left sidebar.
  3. Control-click the drive icon and select Encrypt, followed by the drive name.
  4. Enter a password, enter it again to verify it, and add a password hint if you like.
  5. Click Encrypt Disk. The drive encrypts in the background, and you can keep using it while the work finishes.

From then on, the drive asks for its password whenever you plug it into a Mac. You can tick the option to remember the password in your keychain on a Mac you trust, but leave it unticked on shared or borrowed machines. If the drive holds a Time Machine backup, encrypting the backup disk through Time Machine settings is the safer route, because Time Machine manages the encryption itself and keeps the backup chain intact.

Method 4: Password-protect a single document

Sometimes you only need to lock one file, for example a spreadsheet of household accounts or a letter you are about to send to someone. The apps that come with your Mac can do this on their own.

In Pages, Numbers or Keynote, open the document, choose File from the menu bar, then choose Set Password. Type a password, type it again to verify, and add a hint if you want one. From then on, the document asks for the password whenever it is opened, on any device. To remove the password later, open the document, choose File, then Change Password, and delete the password.

In Preview, you can add a password to a PDF. Open the PDF, choose File, then Export, then click Permissions. Tick the box to require a password to open the document, type the password, and save the new copy. The password travels with the PDF, so the person you send it to needs the password to read it. Share the password through a different channel from the file itself, for example by phone or in person, rather than in the same message as the file.

A third way to lock a single file is to put it inside an encrypted disk image, as described in Method 2, which works for any file type at all, including files that have no password feature of their own. Pick the approach that matches the file: a built-in password when the app supports it, and a disk image when it does not.

How to Choose

Whole-disk encryption or file-level encryption

The first choice is the scope of what you protect. FileVault encrypts everything on your startup disk, including your apps and every user account, so you set it up once and never think about individual files again. File-level methods, such as an encrypted disk image or a password on a document, protect only the files you choose, which suits a shared Mac or a file you need to move to another computer. Many people use both: FileVault as the baseline, plus a disk image for the files that deserve an extra layer. If you only pick one, pick FileVault, because it protects the files you forget about as well as the ones you remember.

Recovery options and password management

Encryption works if you can get back in, so plan recovery as carefully as encryption. With FileVault, decide in advance whether your Apple Account will unlock the disk, or whether you will keep a recovery key. The recovery key is a 24-character code, and losing both your password and your recovery key means losing access to the disk. With a disk image, there is no recovery key: forget the password and the files inside are gone for good. Whatever method you use, store passwords and recovery keys in two places, such as the Passwords app and a written copy kept away from the Mac, and test the protected files open before deleting unprotected copies.

Compatibility, sharing and moving files

Consider where the protected files need to go. FileVault protects the disk inside your Mac, so it does nothing for a file you copy to a USB stick or send by email. An encrypted disk image is a single file that you can copy, back up or send to another Mac, and the recipient only needs the password to open it. A password-protected document works on other devices too, including Windows machines in the case of a PDF. If you share files with other people, agree on the password in advance and send it separately from the file. If the files never leave your Mac, whole-disk encryption is simpler and you avoid managing extra passwords.

Encryption strength and day-to-day convenience

Disk Utility gives you a choice between 128-bit AES and 256-bit AES, and FileVault uses XTS-AES-128 with a 256-bit key. For personal files, 128-bit AES is strong, and the practical difference between the two is speed rather than safety: 256-bit AES is a little slower to open and work with, which shows on a large disk image or an older Mac. Convenience matters too, because a method you find awkward is one you will stop using. Saving the password in your keychain makes opening it effortless, but anyone who can unlock your Mac can open the image, so leave that option off for genuinely sensitive files. Choose the strongest option you will use every day.

Which One Fits Your Situation

You carry a laptop everywhere

Turn on FileVault. A laptop is lost or stolen more often than a desktop, and FileVault protects everything the moment it is switched off or locked. You do not need to remember which files are sensitive, because the whole disk is covered, and on Apple silicon Macs the work is quick because the storage is already encrypted in hardware. Make sure your login password is strong and your recovery key is saved somewhere safe.

You have a few sensitive documents and nothing else

Create a disk image with Disk Utility. Put tax returns, scans of identity documents and private letters inside it, mount it to read a file, and eject it when you are done. Your other files stay ordinary and easy to reach, and you type one extra password only for the files that matter. The original folder stays unprotected until you delete it, so remove the unprotected copy to finish the job.

You need to send a protected file to someone else

Use a password on the document itself, or put it in an encrypted disk image and send the .dmg file. A password-protected PDF is the simplest choice when the other person uses a different system, because any PDF reader can ask for the password. Send the password through a separate channel, such as a phone call, and agree on it before you send the file so nobody is locked out.

You back up to an external drive

Encrypt the backup drive itself. Backups hold a copy of everything, so an unencrypted backup drive undoes all the protection on your Mac. Encrypt the drive from Finder, or turn on encryption in Time Machine settings for a Time Machine backup. Keep the drive password with your other recovery details, and check that you can still restore a file from the backup after encryption is on.

Common Mistakes

  • Forgetting the password or recovery key. With a disk image there is no way back in, and with FileVault the recovery key is your last resort. Store both somewhere safe before you encrypt anything.
  • Deleting the original files too soon. Test that the encrypted copy opens and that the files inside are complete before you delete the unprotected originals.
  • Saving the password in the keychain for sensitive files. Anyone who can unlock your Mac can then open the image without typing anything. Leave the remember option off for files that truly need protection.
  • Encrypting only the obvious files. Old downloads, email attachments and temporary copies often hold the same sensitive information. FileVault covers these automatically, which is why it is the best starting point.
  • Sharing the password with the file. Sending a password-protected file and its password in the same message defeats the purpose. Use a different channel for the password.

Frequently Asked Questions

Does FileVault slow down my Mac?

On Macs with Apple silicon or a T2 security chip, the storage is already encrypted in hardware, so turning on FileVault adds no noticeable slowdown. On older Intel Macs, the first encryption pass runs in the background and can take several hours on a full drive, but you can keep using the Mac while it works, and day-to-day speed after that is barely affected.

What happens if I forget my FileVault password?

You can reset it with your Apple Account if you chose that recovery option when you turned FileVault on. If you chose a recovery key instead, type the 24-character key at the login screen when prompted. If you have neither option available, Apple cannot unlock the disk for you, and the data on it cannot be recovered.

Can I encrypt a folder directly on a Mac?

macOS has no setting that puts a password on an ordinary folder. The built-in way to lock a folder is an encrypted disk image made with Disk Utility: choose File, then New Image, then Image from Folder, and pick an encryption option. The image behaves like a folder when it is open, and asks for a password whenever it is closed.

Is an encrypted disk image safe to store in cloud storage?

An encrypted disk image stays encrypted wherever it is stored, so uploading the .dmg file to the cloud does not expose its contents. The password is still the weak point, so use a strong one and keep it out of the cloud. Some sync services struggle with large files, so confirm the upload completes before deleting the local copy.

M
Moshibabies Editorial Team
We compare specs, materials and verified owner reviews before a product earns a spot. Rankings are never paid.
Affiliate disclosure. As an Amazon Associate we earn from qualifying purchases at no extra cost to you. Prices accurate as of the date shown.