How to password protect a folder on Windows, Mac and your phone

Right-click a folder on Windows or a Mac and you won't find an option to add a password. You can still lock a folder for free, but some of the most popular tricks, like hidden folders and 'folder locker' batch files, only make it look protected. Here's how to password protect a folder on Windows, Mac, Android and iPhone in ways that actually work, and how to share a protected folder with someone else.

By the VeilShare team ·

The short answer

Windows can't put a password on a folder by itself. The easiest free fix is 7-Zip, which puts the folder in an encrypted archive that only opens with your password. On Windows Pro, a BitLocker-encrypted virtual drive works like a folder you can lock. On a Mac, Disk Utility turns any folder into a password-protected disk image.

On Android, Files by Google has a Safe folder locked with a PIN. To send a folder to someone, use a password-protected link: VeilShare encrypts the whole folder in your browser, free up to 3 GB and with no account needed.

Which method should you use?

It depends on your device, and on whether the folder stays with you or goes to someone else:

Ways to password protect a folder
MethodWorks onBest for
7-Zip encrypted archiveWorks onAny Windows PC, freeBest forFiles you rarely open, or want to send
BitLocker virtual driveWorks onWindows Pro, Enterprise and EducationBest forA folder you open and close often
OneDrive Personal VaultWorks onOneDrive on Windows, the web and phonesBest forA few important files, like ID scans
Encrypted disk imageWorks onMac, built inBest forAny folder on a Mac
Safe folder or Secure FolderWorks onAndroid phonesBest forFiles and photos on your phone
Password-protected linkWorks onAny deviceBest forSending a folder to someone else

Each of these keeps the files locked until the password, PIN or fingerprint is entered, and most of them encrypt the files too, so copying them somewhere else doesn't get anyone in. That's the difference from the tricks further down, which only hide a folder.

How to password protect a folder on Windows 11 and 10

With 7-Zip (free, works on Windows 11 Home)

Windows has no password option for folders, and Microsoft says its built-in zip tool doesn't support encrypted archives. The free app 7-Zip does:

  1. Install 7-Zip from 7-zip.org.
  2. Right-click the folder and choose 7-Zip > Add to archive. On Windows 11, click Show more options first.
  3. Choose 7z as the archive format, enter a password twice and tick Encrypt file names, so nobody can see what's inside without the password.
  4. Click OK, open the new file to check the password works, then delete the original folder.

It's the simplest option and works on Windows Home, but you have to extract the files to work on them and archive them again afterwards. Our guide to password protecting a zip file explains the encryption options in more detail.

With a BitLocker virtual drive (Windows Pro)

For a folder you open often, create a virtual drive, a single file on your PC that works like a USB stick, and lock it with BitLocker. It asks for your password each time you open it, and you can work on the files inside directly. BitLocker is part of Windows Pro, Enterprise and Education, not Home.

  1. Right-click the Start button and choose Disk Management.
  2. Choose Action > Create VHD. Pick where to save it and a name, choose VHDX, set a size big enough for your files and select Dynamically expanding, so the file only grows as you fill it. Click OK.
  3. If the new disk shows as Not Initialized, right-click it, choose Initialize Disk, keep GPT and click OK. Then right-click its Unallocated space, choose New Simple Volume and click through the steps to format it.
  4. Search the Start menu for BitLocker and open Manage BitLocker. Next to the new drive, under Fixed data drives, select Turn on BitLocker, choose to unlock it with a password and enter one.
  5. Save the recovery key somewhere safe, like your Microsoft account or a printout, and let BitLocker finish encrypting.
  6. Move your files onto the new drive.

To lock it, right-click the drive in File Explorer and choose Eject. It's also locked after a restart. To open it again, double-click the .vhdx file and enter your password.

With OneDrive Personal Vault

If you use OneDrive with a personal Microsoft account, Personal Vault is a protected folder inside it. It opens only after a second check, like your fingerprint, face, a PIN or a code sent by email or text, and locks itself after 20 minutes of inactivity on the web, or 3 minutes by default on a phone.

The catch: without a Microsoft 365 Personal or Family subscription, it holds only three files. You also can't share files straight from it, so move a file out first if you need to send it.

Windows' Encrypt option isn't a password

In a folder's Properties, under Advanced, Windows Pro has an option called Encrypt contents to secure data. It doesn't ask for a password. It ties the files to your Windows account, so they open normally for anyone signed in as you. It's useful if your laptop is stolen, but not to keep people who use your account out. It also isn't available on Windows Home. See our guide to encrypting a file for more on it.

How to password protect a folder on a Mac

A Mac can't put a password on a folder directly either, but Disk Utility can turn a folder into an encrypted disk image, a file that opens like a drive once you enter the password:

  1. Open Disk Utility. You'll find it in Applications > Utilities, or search for it with Spotlight.
  2. Choose File > New Image > Image from Folder.
  3. Select the folder and click Open.
  4. Enter a name for the disk image and choose where to save it.
  5. Click the Encryption menu, choose an encryption option, enter your password twice and click Choose.
  6. Set Image Format to read-only, then click Save, then Done.
  7. Disk Utility opens the new image right away, so eject it in Finder. Then double-click the .dmg file to check that it asks for your password, and delete the original folder and empty the Trash.

When you open the image, don't tick the option to remember the password in your keychain, or it opens for anyone using your Mac account. Eject it in Finder when you're done. Apple warns that if you forget the password, you won't be able to open the disk image.

A read-only image can't be changed. To keep adding files to a protected folder, create an encrypted blank image instead, which you can copy files into like a USB stick. The steps are in our guide to encrypting a file.

FileVault, which encrypts your whole Mac, is worth having on too, but it doesn't lock a single folder: anyone signed in to your account can still open everything.

How to password protect a folder on Android and iPhone

Android: Safe folder in Files by Google

  1. Open the Files by Google app and scroll to Collections.
  2. Tap Safe folder, then choose PIN or Pattern and set it.
  3. To move files in, select them in Files, tap More and choose Move to Safe folder.

Google says files in the Safe folder are encrypted and can't be opened by other apps. It needs Android 8 or later, and if you forget the PIN or pattern, you can't get the files back.

Samsung Galaxy: Secure Folder

Most Galaxy phones have Secure Folder built in, under Settings > Security and privacy > More security settings. It can hold files, photos and apps behind its own PIN, password or pattern. During setup, turn on Reset with Samsung account: Samsung says that without it, you can't get into Secure Folder if you forget the code.

iPhone: lock the Files app

The Files app can't lock a single folder. Since iOS 18, though, you can lock the whole app: touch and hold the Files icon, tap Require Face ID (or Touch ID or Passcode) and confirm. From then on, Files only opens after Face ID, Touch ID or your passcode.

Tricks that don't actually lock a folder

Search for how to lock a folder and you'll find a few methods that don't keep anyone out:

  • Hidden folders. In Windows 11 File Explorer, anyone can choose View > Show > Hidden items, and on a Mac, pressing Command-Shift-Period in Finder shows hidden files. Hiding is fine for clutter, not for privacy.
  • "Folder locker" batch files. These popular scripts mark the folder as a hidden system folder and ask for a password, but the password is written in plain text inside the .bat file. Anyone who opens it in Notepad can read it, or show hidden system files and open the folder directly.
  • Read-only and Locked. Windows' Read-only setting and the Locked option in a Mac's Get Info window stop files from being changed or deleted by accident. Anyone can still open and read them.

How to share a password-protected folder

Most of the methods above only protect the folder on your own device. Copy the files out to send them and they're normal files again, and a BitLocker drive or Mac disk image is a format many people can't open. To send a folder privately, you have two good options.

An encrypted archive

Make a password-protected 7z or zip file with 7-Zip as above, send it, and send the password some other way, like a text message. Your recipient needs 7-Zip or a similar app to open it, and a folder of photos or documents is often too big for email, which allows 20 to 25 MB.

A password-protected link

VeilShare uploads a whole folder as one link, and your recipient opens it in any browser:

  1. Drop the folder onto the upload box on our homepage.
  2. Pick how long the link should last, 6, 24, 48 or 72 hours, and add a password.
  3. Click on the upload button and send the link. Send the password another way.

Every file is encrypted with AES-256-GCM in your browser before it's uploaded, so we can't see what's in your folder. Your recipient can browse it, download single files or everything as a zip, with nothing to install. It's free up to 3 GB, with no account needed.

Frequently asked questions

Not directly. Windows has no option to add a password to a folder. Use the free app 7-Zip to put the folder in an encrypted archive, or on Windows Pro, a BitLocker-encrypted virtual drive that asks for a password when you open it.

Windows 11 Home has neither BitLocker nor the Encrypt contents option, so use 7-Zip: right-click the folder, choose Show more options > 7-Zip > Add to archive, enter a password, choose AES-256 and delete the original folder afterwards.

Open Disk Utility, choose File > New Image > Image from Folder, select the folder, then pick an option in the Encryption menu and enter a password. Delete the original folder once you have checked the image opens.

No. Anyone can show hidden items in File Explorer or Finder in a few clicks. "Folder locker" batch files are no better, because they just hide the folder and keep the password in plain text inside the file.

Google Drive has no password option for folders. OneDrive has Personal Vault, which needs a second check like your fingerprint or a code to open, but holds only three files unless you pay for Microsoft 365.

Put it in an encrypted 7-Zip archive and send the password separately, or upload it to a service that encrypts it and lets you add a password to the link. Your recipient then needs nothing but a browser.

Sources

Need to send the folder? Lock the link

Upload a whole folder, add a password and share one link. Encrypted in your browser, free up to 3 GB, no account needed.

Partager un fichier