everyday mac tools

How to password protect any file on a Mac, whatever the format

· 7 min read

How you password protect a file on a Mac depends on its format, because macOS has no single password command for files. PDFs get one in Preview (File, Export, Permissions), Pages, Numbers and Keynote files in File, Set Password, and Word documents in Word’s own protection settings. Everything else, from photos and videos to CSV and text files, has to go inside something encrypted: a Disk Utility disk image, or a lock applied to the file where it sits.

Here is each route, and the catch that comes with it.

Which files can carry their own password

Some formats can encrypt themselves. The password lives inside the file and travels with it, so the file stays protected when you email it, upload it or copy it to a USB stick. Other formats cannot hold a password, however you save them.

  • Can: PDF, Pages, Numbers, Keynote, Word (.docx), Excel (.xlsx), PowerPoint (.pptx) and zip archives.
  • Cannot: photos and images (JPEG, PNG, HEIC), video and audio, plain text, RTF, CSV, Markdown, and most other formats.

For the first group, use the app that made the file. For the second, skip to the section on everything else.

PDFs: Preview

  1. Open the PDF in Preview.
  2. Choose File, Export.
  3. Click Permissions, tick “Require Password to Open Document” and type the password.
  4. Save under a new name, so you keep an unprotected original for yourself.

The open password encrypts the document. The permission settings (no printing, no copying) are weaker, because they depend on the reading app choosing to obey them. Password protect a PDF on a Mac covers both kinds, a second method through the Print dialog, and how to send the password without undoing the point.

Pages, Numbers and Keynote: File, Set Password

  1. Open the document and choose File, Set Password.
  2. Type the password, verify it, and add a hint. Anyone who tries to open the file can see the hint, so make it useful to you and meaningless to everyone else.
  3. On a Mac with Touch ID, tick “Open with Touch ID” so you can skip typing it on this Mac.
  4. Click Set Password.

The password stays with the document when it syncs through iCloud Drive or opens on an iPhone or iPad. To change or remove it, go back to the same place in the File menu.

Watch what happens when you export. Exporting a protected document to PDF or Word lets you keep the password on the new file or set a different one. Exporting to EPUB, RTF or plain text cannot carry a password at all, and Pages tells you the new file will open without one. Password protecting Pages, Numbers and Keynote files goes further into hints, Touch ID and iPhone behavior.

Word, Excel and PowerPoint for Mac

In Word, open the Review tab and click Protect Document. In some versions the same settings sit under File, Passwords. Fill in “Password to open”, click OK and save. Excel and PowerPoint for Mac have the same kind of password to open, under File, Passwords or on the Review tab depending on the version.

Only the password to open encrypts the file. The other options look similar and do much less:

  • Password to modify lets anyone open the document read-only, read every word and save a copy of their own.
  • Read-only recommended is a suggestion the person opening the file can dismiss.
  • Protect Sheet and Protect Workbook in Excel stop edits to cells or sheet structure. They do not stop anyone reading the data.

How to password protect a file on a Mac in any other format

For a photo, a video, a CSV export, a text file or anything else that cannot hold a password, you have four honest options.

Put it in an encrypted disk image. Disk Utility makes one from a folder, so put the file (or several) in a folder first. Then choose File, New Image, Image from Folder, set Encryption to 128-bit or 256-bit AES, type a password and save. The .dmg opens only with the password, on any Mac. The catch: Disk Utility copies the file, so the unprotected original stays where it was until you delete it. The full steps and traps are in how to password protect a folder on a Mac.

Print it to a protected PDF. This suits photos, scans and anything you only need to read. In almost any app, choose File, Print, open the PDF menu at the bottom of the dialog, choose Save as PDF, click Security Options and tick “Require password to open document”. You get a new, encrypted PDF and the original is untouched. It flattens the file into pages, so a spreadsheet loses its formulas, and video cannot go this way.

Encrypt it in Terminal. macOS includes openssl, which can encrypt a single file of any type:

openssl enc -aes-256-cbc -pbkdf2 -in passport.jpg -out passport.jpg.enc

It asks for a password twice and writes an encrypted copy. To get the file back:

openssl enc -d -aes-256-cbc -pbkdf2 -in passport.jpg.enc -out passport.jpg

Use the same options both ways. The original stays until you delete it, and the encrypted copy opens only from Terminal, so this suits storing or sending a file rather than daily use. It works on single files, not folders (and some Pages, Numbers and Keynote documents are saved as packages that behave like folders).

Zip it with a password. zip -e secret.zip passport.jpg works for any format and any recipient, including Windows users. The encryption it uses is old and weak, and the names of the files inside are visible without the password, so treat it as an envelope for low-stakes files rather than a lock.

A fifth approach ignores the format entirely. Hushbox locks any file where it sits: right-click it in Finder, choose Lock with Hushbox, and it becomes a locked item in the same folder, shown without its extension (Taxes 2025.pdf shows as Taxes 2025). Double-click it, use Touch ID or your Hushbox password, and it opens in its usual app. Each locked item uses about 33 MB of extra space, so lock a folder of small files rather than each one. It keeps files locked on your Mac and does not send or share them, so for a file you are emailing, use the file’s own password or a disk image.

What a file password does not cover

A password controls who can open the file. Several things sit outside it.

The name. “Salary review 2026.pdf” says plenty even when nobody can open it. Every method above leaves the name readable.

Copies that already exist. Protecting a file changes that one copy. The unprotected original, attachments you already sent, Time Machine backups and older versions macOS saved are all as they were.

The file while it is open. Once unlocked, it is on screen like any other document. Lock the screen when you step away.

A short password. A protected file can be copied and attacked offline at leisure. Three or four unrelated words beat a short string of symbols.

Questions

Can I password protect a file on a Mac without extra software? Yes. Preview, Pages, Numbers and Keynote come with the Mac and can all set a password to open, and so can Word, Excel and PowerPoint for their own files. For any other format, Disk Utility’s encrypted disk image and the Print dialog’s Security Options are part of macOS.

How do I password protect a photo on a Mac? Image files cannot hold a password. Print it to a protected PDF, put it in an encrypted disk image, or lock it where it sits. Pictures inside the Photos app are a separate case: Photos can lock its Hidden album behind Touch ID or your login password.

Is Finder’s Locked checkbox a password? No. It stops accidental edits and deletion, but anyone using your account can untick it, and it never stops anyone reading the file.

What happens if I forget the password? None of these methods has a reset or a back door, which is what makes them worth using. Save each password in a password manager at the moment you set it.