How to password-protect a folder on Windows and macOS

Cartella gialla con lucchetto bianco che rappresenta la protezione con password dei file su Windows e macOS.
Cartella protetta con lucchetto: simbolo della sicurezza dei file su Windows e macOS.

Storing confidential files or personal documents on your computer is now a daily necessity. However, not everyone knows that it’s possible to password-protect a folder to prevent unauthorized access to its contents. Whether you’re using Windows or macOS, there are several simple and secure methods to add a password to a folder. In this guide, you’ll find all the solutions: from the operating system’s built-in tools to reliable free programs.

Why Password-Protect a Folder

Protecting your computer folders is important not only in a professional context but also in your private life. Here are the main reasons:

  • Privacy Protection: Prevent access to personal documents, photos, or confidential files.
  • Business Security: Protect files containing sensitive data or internal projects.
  • Prevention of Unwanted Access: Especially useful on shared or portable computers.
  • Backup Confidentiality: An additional password makes saving to external devices more secure.

How to Password-Protect a Folder on Windows

Windows doesn’t have a direct system for password-locking a folder, but it offers various integrated and free alternatives.

1. Use a Password-Protected ZIP Archive

The simplest and most immediate way to protect a folder is to compress it into a ZIP archive and set a password.

  1. Right-click on the folder you want to protect.
  2. Select Send to → Compressed (zipped) folder.
  3. Open the ZIP file, then go to File → Add password (in programs like WinRAR or 7-Zip).
  4. Enter a strong password and confirm.

From then on, opening the compressed folder will require the chosen password.

2. Protect a Folder with BitLocker (Windows Pro)

If you’re using Windows 10 Pro or Windows 11 Pro, you can use BitLocker, Microsoft’s integrated encryption system:

  1. Right-click on the drive or folder to protect → Turn on BitLocker.
  2. Select “Use a password to unlock the drive.”
  3. Enter and confirm the password.
  4. Save the recovery key (essential) and complete the process.

BitLocker encrypts the content of the folder or the entire drive, preventing access without a password.

3. Create a Protected Folder with 7-Zip

7-Zip is free and open-source software that allows you to create compressed archives with AES-256 encryption:

  1. Download and install 7-Zip (from 7-zip.org).
  2. Right-click on the folder → 7-Zip → Add to archive.
  3. In the “Encryption” field, enter a password and select AES-256.
  4. Click “OK”.

The generated file will only be accessible by entering the correct password.

4. Hide a Folder Using Command Prompt

A quick trick to hide a folder is to use the command prompt:

attrib +h +s "C:UsersYourUsernameDocumentsSecretFolder"

To make it visible again:

attrib -h -s "C:UsersYourUsernameDocumentsSecretFolder"

This isn’t true password protection, but it can be enough to hide folders from less experienced users.

How to Password-Protect a Folder on macOS

On Mac, you can also protect a folder without installing third-party software, thanks to macOS’s built-in tools.

1. Use Disk Utility to Create a Protected Disk Image

Apple’s official method is to create a password-protected disk image file (.dmg):

  1. Open Disk Utility (from Applications → Utilities).
  2. Go to File → New Image → Image from Folder.
  3. Select the folder to protect.
  4. Choose “128-bit AES encryption” or “256-bit AES encryption.”
  5. Enter a strong password and save the .dmg file.

To access the files, you’ll need to mount the image and enter the password.

2. Create a Password-Protected ZIP Archive with Terminal

You can also create a protected archive from the Terminal:

zip -er ProtectedFolder.zip FolderName

The system will ask you to enter a password. When you open the file, you’ll need to enter it to access the contents.

3. Use Dedicated Software (Encrypto, Hider 2, VeraCrypt)

If you prefer a more visual management, you can use free or paid apps:

  • Encrypto – free, allows you to drag and drop files and set custom passwords.
  • Hider 2 – an app for macOS that hides and protects entire folders with passwords.
  • VeraCrypt – an open-source tool also available for Windows, perfect for creating cross-platform encrypted volumes.

How to Choose a Strong Password

Password-protecting a folder is pointless if the password is weak. Here are some practical tips:

  • Use at least 12 characters with uppercase letters, lowercase letters, numbers, and symbols.
  • Avoid names, dates, or common words.
  • Do not reuse the same password for multiple folders or services.
  • Save passwords in a password manager like Bitwarden, 1Password, or KeePassXC.

Alternatives: Encrypting External Drives or Files

If you want to extend protection to entire drives or USB sticks, you can:

  • Use BitLocker To Go on Windows.
  • Use FileVault on macOS (System Preferences → Security & Privacy → FileVault).

These systems completely encrypt the drive’s content, requiring a password to unlock it.

Conclusion

Password-protecting a folder is a simple yet fundamental habit for your data security. Whether you use Windows or macOS, you can choose between built-in solutions like BitLocker and Disk Utility, or external software like 7-Zip, Encrypto, or VeraCrypt. The important thing is to choose a strong password and keep it secure.

Frequently Asked Questions

Can I put a password on a folder without programs?

Yes, on both Windows and macOS, you can do this with built-in tools. On Windows, use BitLocker or a protected ZIP archive; on Mac, you can create a disk image with Disk Utility and set a password.

How can I protect a folder with a password for free?

You can use free programs like 7-Zip, VeraCrypt, or Encrypto, available for both Windows and macOS. They allow you to encrypt and protect folders at no cost.

Can I also protect a USB stick?

Yes, on Windows, you can use BitLocker To Go, while on macOS, you can enable encryption directly from Finder by right-clicking on the drive.

How can I recover a protected folder if I forget the password?

It is not possible to access it without the password. That’s why it’s important to save the recovery key (for BitLocker or FileVault) or store the password in a reliable password manager.

Is it safe to use a password-protected ZIP archive?

Yes, if you use AES-256 encryption through software like 7-Zip or WinRAR. However, avoid using unencrypted ZIPs, which offer no real protection.

Pubblicato in

Se vuoi rimanere aggiornato su How to password-protect a folder on Windows and macOS iscriviti alla nostra newsletter settimanale

Be the first to comment

Leave a Reply

Your email address will not be published.


*