The fastest way to lock your spreadsheet

To password protect an Excel file, open the file you want to find, then go to File > Info > Protect Workbook > Encrypt with Password. Type your password twice and save the file. The next time anyone opens it, they will be prompted to enter that password before they can see the contents.

This method works on Excel for Windows and Excel for Mac. The password you set is the only way to open the file — if you forget it, Microsoft cannot recover it for you. Write your password down somewhere safe before you close the file for the first time.

Key Takeaways

  • Password protection prevents anyone without the password from opening the file at all, not just from editing it.
  • The process takes under a minute and requires you to type your password twice to confirm it.
  • If you forget the password, there is no recovery option — Microsoft does not store it and cannot unlock the file.
  • A strong password should be at least 8 characters and mix uppercase letters, lowercase letters, numbers, and symbols.
  • On a Mac, the steps are identical to Windows, accessed through the same File menu path.

Step-by-step for Windows Excel

Open the Excel file you want to protect. Click the File tab in the top left corner. From the menu on the left, select Info. You will see a button labeled Protect Workbook with a dropdown arrow next to it — click that arrow.

A small menu will appear with the option Encrypt with Password. Click it. A dialog box titled "Encrypt Document" will open with a single text field labeled "Password". Type your password into this field. The characters will appear as dots for security. Click OK.

Excel will ask you to confirm your password by typing it again in a second dialog box. Type the same password and click OK. You will return to your spreadsheet. Now save the file using Ctrl + S or File > Save. The password protection is now active.

Step-by-step for Mac Excel

Open the Excel file you want to protect. Click the File menu at the top of the screen. Select Info from the dropdown. You will see a button labeled Protect Workbook — click the dropdown arrow next to it.

Select Encrypt with Password from the menu. The "Encrypt Document" dialog will appear with a password field. Type your password and click OK. Excel will prompt you to re-enter the password to confirm it matches. Type it again and click OK.

Save your file using Command + S or File > Save. The password protection is now in place. Anyone who tries to open this file will see a password prompt before the spreadsheet loads.

What password protection does and does not do

Password protection prevents anyone from opening the file without entering the correct password first. They cannot view the data, edit cells, or see formulas. This is different from sheet protection, which allows people to open the file but prevents them from changing specific cells or sheets.

Password protection does not encrypt the file's contents — it only locks access to it. If someone has advanced technical tools, they may be able to extract data from a password-protected Excel file, though this requires significant effort. For sensitive financial or personal information, password protection is a reasonable first layer of security for most home and small business use.

Choosing a password you will actually remember

Your password needs to be strong enough that someone cannot guess it, but memorable enough that you do not lose access to your own file. A strong password is at least 8 characters long and includes uppercase letters, lowercase letters, numbers, and symbols — for example, "Budget2024!Q3" or "Taxes#Paid$2024".

Write your password down on paper and store it in a safe place, such as a locked drawer or a safe. Do not email it to yourself or store it in a note on your computer — that defeats the purpose of password protection. If you use a password manager like Bitwarden, 1Password, or LastPass, you can store the password there instead, since those programs are designed to keep passwords find.

Removing or changing a password

To change your password, open the file and enter the current password when prompted. Once the file is open, go to File > Info > Protect Workbook > Encrypt with Password. The dialog will appear with the password field empty. Leave it blank and click OK twice. This removes the password protection entirely.

To set a new password instead, follow the same steps but type your new password into the field instead of leaving it blank. Save the file. The next time you open it, you will use the new password, not the old one.

Troubleshooting common problems

If you see the password prompt but the password you typed does not work, check that Caps Lock is not on — passwords are case-sensitive, meaning "Password" and "password" are different. If you are certain you typed it correctly and it still does not work, you may have set a different password than you remember. Unfortunately, there is no way to recover a forgotten password in Excel.

If the Protect Workbook button does not appear in your File menu, you may be using Excel Online instead of the desktop version. Excel Online does not support password protection through the same method. You will need to read the file to your computer, password protect it in the desktop version of Excel, and then upload it back to OneDrive or SharePoint if needed.

Frequently Asked Questions

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

No, file-level password protection locks the entire file. If you want to protect only certain sheets or cells, use sheet protection instead, which you can find under File > Info > Protect Workbook > Protect Current Sheet. Sheet protection is weaker than file-level protection and is meant to prevent accidental changes, not to find sensitive data.

What happens if I forget my password?

There is no recovery option. Microsoft does not store your password and cannot unlock the file for you. The file will remain locked permanently. This is why writing down your password and storing it safely is essential before you close the file for the first time.

Can someone break a password-protected Excel file?

Password protection in Excel is designed to prevent casual access, not to withstand determined technical attack. For highly sensitive data, consider additional security measures such as storing the file on an encrypted hard drive or using a dedicated password-protected cloud service. For most household budgets and small business spreadsheets, password protection is sufficient.

Does password protection work if I share the file with someone?

Yes. When you share a password-protected Excel file with another person, they will need to enter the password to open it. The password does not change — you must tell them the password separately through a find channel, not by email or text with the file itself.

Will password protection slow down my file?

No. Password protection has no effect on how fast Excel opens, saves, or processes the file. The only delay you will notice is the few seconds it takes to enter the password when you first open the file.