You can't put a password on an ordinary folder in macOS. To lock one, move the files into an encrypted container. The free, built-in way is an encrypted disk image: in Disk Utility choose with 256-bit AES. Enter the password to open it, eject it to lock it. Apps like Doghouse do the same in one click.
On this page
Every method compared
Six ways to keep a folder's contents private on a Mac, plus the one people try first. The column that matters most is the second: whether the files are still protected while you're logged in and someone else is at the keyboard.
| Method | Real encryption | Safe while you're logged in | Works like a folder | Effort | Cost |
|---|---|---|---|---|---|
| Encrypted disk imageDisk Utility, built in | AES-256 | Yes, once ejected | Yes | Mount and eject each time | Free |
| DoghouseOur app · same Apple disk images | AES-256 | Yes, locks itself | Yes, in Finder | One click or Touch ID | Free for one vault · €19 / $19 once |
| Encrypted archive7z via Keka · not built-in zip | AES-256 | Yes | No, extract to use | Unpack and repack | Free |
| Password-protected PDFPreview | Yes | Yes | No, one PDF | Low | Free |
| Locked notesNotes app | Yes | Yes | No, notes only | Low | Free |
| Separate user accountSystem Settings | Whole disk only | Only from other accounts | Yes | Log out and in | Free |
| Hiding the folderchflags, dot names | None | No | Yes | Low | Free |
Scroll sideways on small screens. “Safe while you're logged in” means someone using your unlocked Mac can't open the files without the password.
What “password-protected” actually means on a Mac
Finder has no “set password” option, and nothing in System Settings adds one. Anything that claims to lock a folder does one of three things: it encrypts the files, it changes permissions, or it hides them. Only encryption keeps the contents unreadable when someone copies the folder to a USB stick, opens it from another account, or sits down at your Mac while you're logged in.
It also helps to be clear about what you're protecting against:
- A lost or stolen Mac. FileVault handles this. It encrypts the whole disk while the Mac is off or at the login screen. Keep it on.
- Someone at your Mac while you're logged in — a partner, a child, a colleague, a repair shop — plus apps and sync services that read whatever is on disk. FileVault does nothing here, because logging in unlocked everything. This is what a password-protected folder is for.
Encrypted disk image with Disk Utility
- Encryption AES-128 or AES-256
- Cost Free, built in
- Best for A private folder you open now and then
An encrypted disk image is a single file that behaves like a drive. While it's locked, the contents are unreadable. Enter the password and it appears in Finder like a folder you can drag files in and out of. Every Mac can make one with Disk Utility.
- Open Disk Utility. It's in Applications › Utilities, or press ⌘ Space and type “Disk Utility”.
- Choose . Not “Image from Folder” — see the warning below.
- Fill in the dialog:
- Save As / Where: the file name and location. Pick somewhere outside iCloud Drive if it should stay on this Mac. Desktop and Documents sync to iCloud when “Desktop & Documents Folders” is turned on.
- Name: what the unlocked folder is called in Finder.
- Size: the most it will ever hold. A sparse bundle only takes up the space of what's inside, so it's fine to go bigger than you need.
- Format: APFS.
- Encryption: 256-bit AES encryption. You'll be asked to type the password twice.
- Partitions: leave the default.
- Image Format: Sparse Bundle Image. On macOS Sequoia and earlier it's called “sparse bundle disk image”.
- Click Save. macOS creates the image and unlocks it straight away. It shows up in Finder's sidebar under Locations.
- Move your files in, then delete the originals from their old place and empty the Trash. Until you do, unencrypted copies still exist.
- Lock it by ejecting it — click the eject button next to its name in the Finder sidebar, or select it and press ⌘ E. To unlock, double-click the
.sparsebundlefile and enter the password.
Don't tick “Remember password in my keychain” if other people use your Mac.
macOS offers it when you unlock the image. Tick it and the image opens for anyone using your logged-in account, without asking for a password — which defeats the point.
Why not “Image from Folder”?
It makes an encrypted copy of a folder, but the default formats are read-only, so you can't add files later. Your original folder also stays unencrypted next to it. If you use it anyway, choose RAW Image (called “read/write” on older macOS), which takes up its full size on disk, and delete the original afterwards.
The catch
This is real, strong encryption, and it costs nothing. The friction comes every time you use it: find the file, mount it, type the password, and remember to eject it. Nothing locks it for you — it stays open until you eject it, log out or shut down. If you walk away with it mounted, it's as open as any other folder.
Want to go further — choosing between image formats, the Terminal method, resizing, reclaiming space, or changing the password? See our complete guide to encrypted disk images on Mac.
Doghouse: the same encryption, without the chores
- Encryption AES-256, Apple disk images
- Cost Free for one vault · €19 / $19 once for unlimited
- Needs macOS 14 or later
- Best for Folders you open every day
Doghouse creates the same kind of encrypted disk image as method 1, then takes care of the parts people forget: unlocking, opening in Finder, and locking again.
- Download Doghouse and open it. There's no account to create.
- Click + New Vault. Give it a name, a location, a size limit and a password. “Keep out of iCloud” is on by default. “Remember password in my Keychain” is on too; to make Doghouse ask for your fingerprint first, switch on Require Touch ID to unlock in the vault's settings.
- Click Unlock, or use Touch ID. The vault opens in Finder as a normal folder. You can also right-click any file in Finder and choose “Add to Doghouse Vault”.
- Lock it with one click, from the menu bar, or with the panic shortcut ⌃⌥⌘L, which locks every vault at once. Vaults also lock themselves after 15 minutes idle (you can change this), when the screen locks, when the Mac sleeps, or when you quit.
Vaults are standard Apple encrypted disk images. If Doghouse disappeared tomorrow, Disk Utility could still open every one — all you need is the password. There's a side-by-side comparison with FileVault and Disk Utility on our homepage.
Encrypted archive (7z or zip)
- Encryption AES-256 with 7z · weak with built-in zip
- Cost Free
- Best for Sending files, or archiving ones you rarely open
You can compress a folder into a password-protected archive, but the tool matters. The zip command that comes with macOS only supports ZipCrypto, a 1990s scheme with a published attack. It's fine for keeping out someone casually curious, but not for anything sensitive.
# Works, but uses weak ZipCrypto encryption. Avoid for sensitive files.
zip -er Private.zip "Private Folder"
For real encryption, use a free archiver such as Keka to create a 7z archive with a password, which uses AES-256. The downside is how you use it: to open a file you extract it, which leaves an unencrypted copy on disk, and after editing you have to re-archive. That's great for sending files, awkward for a folder you work in.
Sending an encrypted archive? Share the password another way — a text message or a phone call, not the same email.
Password-protected PDF in Preview
- Encryption PDF password
- Cost Free, built in
- Best for A single document you need to share
If the “folder” is really one or two documents, Preview can lock each PDF on its own.
- Open the PDF in Preview and choose .
- Click Permissions, tick Require Password To Open Document, then enter the password twice.
- Set an Owner Password, which controls printing, copying and editing. Then click Apply, then Save.
Each PDF gets its own password, so this doesn't scale to a folder of mixed files.
Locked notes in the Notes app
- Encryption Yes, per note
- Cost Free, built in
- Best for Short text: codes, account details, private notes
Notes can lock individual notes with your Mac login password, a separate password, or Touch ID. Select a note, click the More button (⋯) next to the search field and choose Lock Note. Choose which password to use in .
It's a good home for small pieces of text, not for folders of files. If you use a custom password and forget it, Apple can't unlock those notes for you.
A separate user account
- Encryption Whole disk (FileVault), not per folder
- Cost Free, built in
- Best for A Mac shared by people who each log in
If several people use one Mac, give each of them their own account in . Other standard users can't open your Desktop, Documents or Downloads folders.
This protection comes from permissions, not a password on the folder, and it only holds if everyone uses their own account and you lock the screen when you step away. It doesn't help when you hand someone your logged-in Mac, and an administrator can change permissions. Pair it with an encrypted disk image for anything truly private.
What doesn't work (but gets recommended anyway)
-
Hiding the folder. Running
chflags hiddenor starting the name with a dot only hides the folder in Finder. Pressing ⌘ ⇧ . shows it again, and Spotlight can still find what's inside. -
Ticking “Locked” in Get Info. This stops the folder being changed or deleted. Anyone can still open it and read every file.
-
Relying on FileVault alone. It protects the disk while the Mac is off. Once you've logged in, every folder is open to whoever is at the keyboard and to any app that looks.
Which method should you use?
A private folder you open now and then, and you don't mind a few clicks
Disk Utility encrypted disk image
Folders you use every day that should lock themselves when you walk away
Doghouse
Sending private files to someone else
7z archive with Keka, or a locked PDF
Passwords, codes and short private notes
Locked notes, or a password manager
Several people share one Mac
Separate accounts, plus a vault for what's truly private
Your Mac might be lost or stolen
FileVault — keep it on alongside any of the above
If you forget the password
Real encryption means there's no reset and no back door. Apple can't open an encrypted disk image without its password, and neither can we.
Before you give up, search your keychain (Keychain Access, or the Passwords app) for the disk image's name, in case you saved the password when you first unlocked it. If it isn't there, the files are gone.
So when you create one: save the password in a password manager or your Keychain, or write it down and keep it somewhere that isn't inside the vault.
Frequently asked questions
Can you put a password on a folder in macOS?
Not directly. macOS has no password setting for ordinary folders. The built-in way is to put the files in an encrypted disk image made with Disk Utility, which asks for a password each time you open it. Apps like Doghouse do the same thing with less effort.
Can I password-protect a folder on Mac without installing anything?
Yes. Disk Utility, which comes with every Mac, creates encrypted disk images: choose File › New Image › Blank Image, then 256-bit AES encryption. It's free and uses the same encryption Doghouse uses. See method 1.
Can I lock a folder with Touch ID on a Mac?
Not with macOS's built-in tools. An encrypted disk image asks for its password, or opens without asking if you saved the password in your keychain. Doghouse can save the password in Keychain and require Touch ID before using it.
Should I choose 128-bit or 256-bit AES encryption?
Neither has been broken. 256-bit is the stronger choice and costs very little speed on a modern Mac, so there's no reason not to pick it. The strength of your password matters far more.
Does FileVault already password-protect my folders?
Only while the Mac is off or at the login screen. Once you log in, FileVault has unlocked everything. To protect particular folders while you're logged in, use an encrypted disk image or an app like Doghouse, and keep FileVault on as well.
Will an encrypted folder sync to iCloud?
Only if you save it somewhere iCloud syncs, such as iCloud Drive, or Desktop and Documents when that setting is on. If it does sync, it stays encrypted. To keep it on your Mac, save it somewhere else. Doghouse keeps vaults out of iCloud by default.
Can I open an encrypted disk image on another Mac?
Yes. Copy the .sparsebundle file to any Mac, double-click it and enter the password. Windows can't open Mac disk images without extra software.
What happens if I forget the password to an encrypted folder?
The files can't be recovered. There's no reset. First check your keychain for the disk image's name in case you saved the password. Otherwise the contents are gone, which is why it's worth saving the password somewhere safe that isn't inside the encrypted folder.
About this guide
Written by the Doghouse team at Sprout Media in Dublin. We make Doghouse, a Mac app for password-protected folders, which is why we've spent more time than most with Disk Utility's encryption settings. Steps are checked against Apple's documentation for macOS Tahoe 26, and older menu names are noted where they differ.
Published · Last updated . Spotted something out of date? Tell us.
Sources
- Create a disk image using Disk Utility on Mac — Apple Support
- Protect data on your Mac with FileVault — Apple Support
- Password-protect a PDF in Preview on Mac — Apple Support
- Lock your notes on Mac — Apple Support
- Add a user or group on Mac — Apple Support
- How to create secure encrypted zip or 7z archives — How-To Geek
- Can you exclude folders from iCloud sync on Mac? — How-To Geek