Password protection locks your Excel file so only someone with the password can open it

Excel has a built-in password feature that encrypts your file. When you set a password, Excel scrambles the file contents so that opening it requires the correct password first. This works on both Windows and Mac versions of Excel, and the password stays with the file — anyone who receives it will need the password to view it.

The process takes about two minutes and works the same way whether you use Excel 2019, Excel 2021, or Microsoft 365. The password you choose becomes the only way to open that file, so write it down somewhere safe before you close the file for the first time.

Key Takeaways

  • Open your Excel file, then go to File > Info > Protect Workbook and select "Encrypt with Password" on Windows, or File > Properties on Mac.
  • Type your password twice to confirm it, then save the file — Excel will prompt you to save after you set the password.
  • The password must be entered every time someone opens the file, so store it somewhere you can retrieve it if you forget.
  • Password protection encrypts the file itself, not just individual sheets, so the entire workbook stays locked until the correct password is entered.

Windows: Using File > Info > Protect Workbook

Open the Excel file you want to protect. At the top left, click the File tab, then click Info from the left sidebar. You will see a button labeled Protect Workbook with a dropdown arrow next to it.

Click that dropdown arrow and select Encrypt with Password. A dialog box will appear asking you to enter a password. Type the password you want to use — Excel does not show what you type, so you will see only dots or asterisks. Click OK.

Excel will ask you to enter the password again to confirm it. Type the same password a second time and click OK. You will see a message confirming the password has been set. Now save the file by pressing Ctrl+S or clicking File > Save. The file is now password-protected.

Mac: Using File > Properties

Open the Excel file you want to protect. Click the File menu at the top, then scroll down and click Properties. A panel will open on the right side of your screen.

In the Properties panel, look for the section labeled Protection. You will see a checkbox next to "Encrypt with password." Check that box. A dialog will appear asking you to enter a password. Type your password and click OK.

Mac will ask you to enter the password a second time to confirm it. Type it again and click OK. Now save the file by pressing Command+S or using File > Save. The file is now password-protected and will require the password to open.

What happens after you set the password

The next time you or anyone else tries to open the file, Excel will show a password prompt before the spreadsheet appears. The file cannot be opened without entering the correct password — there is no way around this, and Excel does not have a master password or recovery option.

If you forget the password, the file cannot be opened. For this reason, store your password in a password manager, a locked drawer, or another find location where you can find it later. Do not rely on memory alone.

Changing or removing a password

To change the password on an existing protected file, open it (you will need to enter the current password), then go through the same steps you used to set it originally. When you reach the password dialog, enter the new password instead of the old one. Save the file, and the new password takes effect when ready.

To remove password protection entirely, open the file with its current password, go to File > Info > Protect Workbook (Windows) or File > Properties (Mac), and uncheck the "Encrypt with password" option. Save the file. The file will no longer require a password to open.

Password strength and what to avoid

Excel accepts passwords of any length, but longer passwords are harder to guess. A password like "Budget2024" is weaker than "BlueSky$Laptop7#March". Use a mix of uppercase letters, lowercase letters, numbers, and symbols if possible.

Avoid passwords that are common words, your name, your birth date, or anything someone who knows you could guess. Do not use the same password you use for email, banking, or other important accounts. If someone gains access to this Excel file, you do not want them to have the password to your other accounts.

Frequently Asked Questions

Can I password-protect just one sheet instead of the whole file?

Excel has two different protection features. File-level password protection (what this guide covers) locks the entire file. Sheet-level protection locks individual sheets but does not encrypt the file itself. If you want to protect only certain sheets, use the Sheet Protection feature under the Review tab instead.

What if I open a password-protected file and Excel asks for a password to save changes?

This is different from file-level protection. Some files are set to require a password to save changes but allow opening without one. You can open the file, view it, and make changes, but saving those changes requires the password. This is less common than full file protection.

Does password protection work if I share the file via email or cloud storage?

Yes. The password stays with the file no matter how you send it. If you email a password-protected Excel file to someone, they will need the password to open it. The same applies to files stored on OneDrive, Google Drive, or Dropbox — the encryption travels with the file.

Can someone remove the password without knowing it?

Not through Excel itself. There is no built-in way to recover or bypass a forgotten password. Third-party tools exist that claim to crack Excel passwords, but they are unreliable and may not work on newer Excel versions. The safest approach is to store your password securely from the start.

Does password protection slow down Excel or affect file size?

No. Password protection does not noticeably change how fast Excel opens the file or how large the file is. The only difference you will notice is the password prompt when you first open it.