The simplest way to password-protect a file

The fastest method depends on what you already have on your computer. Windows comes with a built-in tool called BitLocker that encrypts entire folders. Mac users have FileVault for the same purpose. If you want to encrypt a single file without touching your whole system, 7-Zip (free, Windows and Mac) or WinRAR (paid, Windows) let you compress a file into an encrypted archive with a password in about 30 seconds.

The trade-off is straightforward: whole-disk encryption like BitLocker protects everything automatically but requires setup once. Single-file encryption with 7-Zip takes longer each time you use it but gives you control over which files get locked. For most people protecting a document, spreadsheet, or photo, the single-file method is faster to learn and use.

Key Takeaways

  • 7-Zip and WinRAR compress a file into a password-protected archive in under a minute, and the encrypted file works on both Windows and Mac.
  • BitLocker (Windows) and FileVault (Mac) encrypt your entire hard drive or a whole folder, protecting everything inside automatically once you set a password.
  • A password-encrypted file still looks like a normal file on your computer — you just need the password to open it.
  • Encryption scrambles your file so thoroughly that even someone with direct access to your hard drive cannot read it without the correct password.

Encrypting a single file with 7-Zip on Windows

read 7-Zip from the official website (7-zip.org). Install it like any other program. Right-click the file you want to encrypt, hover over "7-Zip", and click "Add to archive". A dialog box opens.

In the dialog, look for "Encryption" near the bottom. Click the dropdown that says "None" and change it to "AES-256". Type your password in the "Enter password" field and type it again in "Reenter password" to confirm. The filename will stay the same but gain a .7z extension. Click OK. The encrypted file appears in the same folder as the original.

Delete the original unencrypted file once you confirm the .7z version opens and asks for your password. To open it later, right-click the .7z file, click "7-Zip", then "Extract". Enter your password when prompted.

Encrypting a single file on Mac

Mac does not come with a built-in single-file encryption tool like Windows has. Your options are to read 7-Zip (which works on Mac), use the Disk Utility app to create an encrypted disk image, or use a third-party app like Keka (free) or The Unarchiver (free).

The easiest route is Disk Utility, which comes with your Mac. Open Disk Utility (search for it in Spotlight). Click "File" at the top, then "New Image" and "Image from Folder". Select the file or folder you want to encrypt. When prompted, choose "AES-256 encryption" and set a password. The encrypted image appears as a .dmg file. Double-click it later and enter your password to access the contents.

Encrypting an entire folder with BitLocker (Windows)

BitLocker encrypts a whole folder so that everything inside it — and anything you add to it later — stays encrypted automatically. You do not have to remember to encrypt each file separately.

Right-click the folder you want to protect and select "Turn on BitLocker". Windows asks you to choose how to unlock it: with a password or with a USB drive. Choose password. Enter a strong password twice. Windows then asks where to save a recovery key — save it somewhere safe, like a USB drive or email, in case you forget your password. Click "Start encrypting". The process runs in the background and may take minutes or hours depending on the folder size.

Once encryption finishes, the folder shows a small lock icon. You can open it normally, but if someone else tries to access it without the password, they see only an encrypted file they cannot read.

Encrypting your entire hard drive with FileVault (Mac)

FileVault encrypts everything on your Mac automatically. You set it up once and never think about it again. Open System Settings, click "Privacy & Security" on the left, then scroll down and click "FileVault". Click "Turn On". Mac asks for your password to confirm. You can also set up a recovery key — write it down or save it somewhere safe.

FileVault runs in the background and encrypts your drive over time. Your Mac works normally the whole time. When you restart, you enter your password to unlock the drive. If you ever sell or give away your Mac, the new owner cannot access your files without that password, even if they erase the drive and reinstall the system.

When to use each method

Use single-file encryption (7-Zip or Disk Utility) when you have a few sensitive documents you want to lock up but do not need to encrypt everything. It is faster to set up and you can share the encrypted file with someone else — they just need the password to open it.

Use folder encryption (BitLocker or FileVault) when you want ongoing protection without thinking about it. Everything in that folder stays encrypted automatically. Use whole-disk encryption (FileVault on Mac, BitLocker on Windows Pro or higher) when you want maximum protection — your entire hard drive is encrypted, so if your computer is stolen, the thief cannot read anything on it.

What happens if you forget your password

If you encrypt a file with 7-Zip or a similar tool and forget the password, the file is gone. There is no "forgot password" button. Encryption is designed to be unbreakable, which means even the software maker cannot unlock it for you. Write down your password or store it in a password manager before you encrypt anything.

If you use BitLocker or FileVault, you have a recovery key — a long code that unlocks your drive if you forget your password. Save this key somewhere you will actually find it, like a printed document in a drawer or a note in your email. Without it, you cannot access your encrypted drive.

Frequently Asked Questions

Can I open an encrypted file on a different computer?

Yes, if you use 7-Zip or WinRAR. The encrypted .7z or .rar file works on any computer that has 7-Zip or WinRAR installed. Just copy the file to the other computer, right-click it, extract it, and enter the password. BitLocker and FileVault are tied to your specific computer and cannot be moved.

Is AES-256 encryption really unbreakable?

AES-256 is the same encryption the U.S. government uses for classified documents. It would take a computer billions of years to guess a strong password. The only realistic way someone accesses your file is if they guess your password, so use something long and random that is not a word from the dictionary.

Does encrypting a file make it smaller or larger?

When you use 7-Zip or WinRAR, the encrypted file is usually slightly smaller because compression happens at the same time. BitLocker and FileVault do not change file size — they just scramble the data. The encrypted file takes up the same space as the original.

Can I edit an encrypted file without decrypting it first?

No. You must extract or unlock the encrypted file, make your changes, then encrypt it again. This is why single-file encryption works best for documents you do not change often. If you edit a file constantly, folder encryption is better because you do not have to re-encrypt after every change.

What if I lose my BitLocker recovery key?

If you forget your password and cannot find your recovery key, your drive is locked permanently. You cannot access any files on it. This is why saving the recovery key before you turn on BitLocker is critical — write it down, email it to yourself, or store it on a USB drive you keep in a safe place.