How do I encrypt a file on Mac: The methods that actually keep your data private

How do I encrypt a file on Mac: The methods that actually keep your data private

Let's be real. You probably have something on your computer right now that you don't want anyone else to see. It’s not necessarily anything scandalous. Maybe it’s just a PDF of your tax return, a list of passwords you haven't moved to a manager yet, or a scanned copy of your passport for that trip to Japan. If you've ever wondered how do I encrypt a file on Mac without feeling like you need a degree in computer science, you aren't alone. Most people think they're protected just because they have a login password.

They aren't.

If someone steals your laptop, a simple password won't stop a dedicated person from pulling your drive and reading the data. Encryption is the only thing that turns your readable files into total gibberish that even the best hackers can't crack without your specific key. macOS actually has some of the best built-in tools for this, but Apple hides them in weird places.

The Disk Utility trick for folders

Most people looking to protect a single file actually find it easier to protect a "container." Think of it like a digital safe. You create the safe, put your files inside, and lock the door.

To get this going, you’ll need Disk Utility. It’s sitting in your Applications > Utilities folder. Once you open it, go to the top menu bar and select File > New Image > Image from Folder. Pick the folder where you’re keeping your sensitive stuff.

Here is where people mess up: the encryption settings. When the prompt pops up, you’ll see an "Encryption" dropdown. Choose 128-bit AES if you want speed, or 256-bit AES if you’re extra paranoid. Honestly, 128-bit is plenty for 99% of humans. Pick a password that isn't your birthday. For the "Image Format," make sure you select read/write. If you don't, you won't be able to add new files to that encrypted folder later.

🔗 Read more: The Lightning to 3.5 mm Plug Adapter: Why We’re Still Buying These Things in 2026

Hit save. macOS will churn for a second and spit out a .dmg file. That is your encrypted vault. You can delete the original, unencrypted folder now. Whenever you need those files, double-click the .dmg, enter your password, and it appears like a regular drive on your desktop. Eject it when you're done. Simple.

Why FileVault is your first line of defense

Before we get into individual files, we have to talk about the "big button" solution. Apple has this feature called FileVault 2. It doesn't just encrypt one file; it encrypts your entire solid-state drive (SSD).

If you haven't turned this on, go to System Settings > Privacy & Security > FileVault.

It uses XTS-AES-128 encryption with a 256-bit key. Basically, it’s military-grade stuff. The beauty of FileVault is that it works in the background. You won't even notice it's there. But if your Mac is powered off and someone tries to bypass the login screen to get to your data, they’ll hit a wall of encrypted nonsense. It's the most effective way to answer the question of how do I encrypt a file on Mac at scale.

One warning: do not lose your recovery key. If you forget your login password and lose that key, your data is gone. Not "call Apple and they'll fix it" gone. It's "gone forever" gone.

Encrypting individual iWork documents

Maybe you don't want a whole digital safe. Maybe you just have one spreadsheet in Numbers or one document in Pages that needs a lock.

Apple made this incredibly easy within their own productivity suite. Open your document in Pages, Numbers, or Keynote. Go to the File menu and look for Set Password.

You'll get a prompt to enter a password and a hint. You can even check a box to "Remember this password in my keychain" so you don't have to type it every single time you’re on your own Mac. But the cool part? If you email that file to someone else, they can’t open it without that password. It’s perfect for sending sensitive contracts or budget sheets.

The Terminal method for the bold

If you want to feel like a hacker—or if you just want a quick way to zip a file with a password—the Terminal is your friend. It’s faster than clicking through menus once you know the command.

Open Terminal (Command + Space, type "Terminal"). Navigate to your folder using cd.

Type this: zip -e protected.zip original_file.txt

The -e flag stands for encrypt. Once you hit Enter, it will ask you to type a password. You won't see the characters appearing as you type—that's a security feature, not a glitch. Type it anyway and hit Enter. Now you have a password-protected ZIP file that works on Windows, Linux, and Mac. It’s arguably the most compatible way to handle encryption.

What about third-party apps?

I'm generally wary of third-party "security" apps. A lot of them are just bloatware that wants to charge you a subscription for something your Mac does for free. However, if you're handling a massive amount of data or need to share encrypted files with Windows users constantly, VeraCrypt is the industry standard. It's open-source and has been audited a million times.

👉 See also: Slash Symbols Explained: Why the Forward Slash is Everywhere from URLs to Tone Indicators

Another solid choice is Keka. It’s a file archiver for Mac that makes the ZIP encryption process way more user-friendly than the Terminal method. You just drag a file in, set a password, and choose AES-256.

Common myths about Mac encryption

Some people think that hiding a file or changing the extension (like turning "secret.pdf" into "secret.jpg") is a form of protection. It's not. That's called "security by obscurity," and it’s about as effective as hiding your house key under the doormat. Any basic file recovery tool will see right through that.

Another misconception is that iCloud automatically encrypts everything. While Apple does encrypt data in transit and on their servers, they hold the keys for many categories of data unless you turn on Advanced Data Protection.

If you want true end-to-end encryption where even Apple can’t see your stuff, go to your iCloud settings and enable Advanced Data Protection. This ensures that the keys for your backups, Photos, and Notes stay only on your devices.

Actionable Next Steps

Don't just read this and move on. Take five minutes to secure your stuff right now.

  1. Check FileVault: Open System Settings and make sure FileVault is "On." If it’s off, turn it on and save that recovery key in a physical notebook—not just on your computer.
  2. Audit your desktop: Look at those PDFs sitting on your desktop. Are they sensitive? Create one encrypted disk image using Disk Utility and move them all in there.
  3. Clean up: Delete the unencrypted versions of files once you've moved them into your encrypted "safe." Use the "Empty Trash" function immediately.
  4. Update your OS: Security patches are vital. Encryption is only as good as the operating system it’s running on.

Encryption sounds intimidating until you realize it's just a couple of clicks. Your future self—the one who might lose their laptop at a coffee shop—will thank you for taking the time to do this today.