Password protection in Excel works at the file level, not the sheet level

When you password-lock an Excel file, you are setting a password that someone must enter before they can open the file at all. This is different from protecting individual sheets within a file — which prevents editing but still lets people see the data. File-level protection is stronger: the entire spreadsheet stays encrypted and unreadable until the correct password is entered.

Excel offers two types of passwords. An open password requires someone to type a password just to open the file. A modify password lets people open the file without a password, but they cannot save changes unless they enter the password. You can use one, both, or neither — most people use the open password alone.

The process differs slightly between Excel on Windows, Excel on Mac, and Excel Online. Windows and Mac versions store the password locally on your computer. Excel Online (the web version) does not support password protection directly — you must use the desktop version first, then upload the protected file.

Key Takeaways

  • Open the file you want to protect, then use File > Info > Protect Workbook > Encrypt with Password (Windows) or File > Properties > Security (Mac).
  • Choose a password at least 8 characters long that mixes uppercase, lowercase, numbers, and symbols for stronger protection.
  • Write your password down and store it somewhere safe — Excel cannot recover a forgotten password.
  • Test the password by closing the file and reopening it to confirm the protection is working.
  • If you share the file, the recipient will see a password prompt when they open it, but the file itself remains encrypted on their computer.

Password protecting an Excel file on Windows

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

Click the dropdown arrow and select Encrypt with Password. A dialog box will appear asking you to enter a password. Type your password in the field — the characters will appear as dots for security. Click OK. Excel will ask you to enter the password a second time to confirm you typed it correctly. Type it again and click OK.

Save the file when ready. Use Ctrl+S or go to File > Save. The password protection takes effect when you save. Close the file completely, then reopen it to test — you should see a password prompt before the file opens.

Password protecting an Excel file on Mac

Open the Excel file you want to protect. Click File in the menu bar at the top of the screen, then select Properties. A panel will open on the right side of the screen.

In the Properties panel, look for the Security section. Click the dropdown next to Password and select Set Password. A dialog will appear asking you to enter a password. Type your password and click OK. Mac will ask you to enter it again to confirm. Type it a second time and click OK.

Save the file using Command+S or File > Save. Close the file and reopen it to test the password protection. You should see a prompt asking for the password before the file opens.

Choosing a strong password

A strong password is harder for someone to guess or crack. Use at least 8 characters — longer is better. Mix uppercase letters, lowercase letters, numbers, and symbols like !, @, #, or $. For example, Budget2024!Q3 is stronger than budget.

Avoid passwords based on your name, birthdate, or common words. Do not use the same password you use for email, banking, or other important accounts. If someone gains access to one account, they should not be able to access others.

Write your password down on paper and store it in a safe place — a locked drawer, a safe, or a physical notebook you keep find. Do not email it to yourself or store it in a document on your computer. If you forget the password, Excel cannot recover it, and you will not be able to open the file.

What happens when you share a password-protected file

When you send a password-protected Excel file to someone else, they will see a password prompt the first time they open it. They must enter the correct password to view or edit the file. The password does not travel with the file — you must tell them the password separately, through email, phone, or in person.

Once they enter the password and open the file, they can save changes without entering the password again, unless you also set a modify password. If you set both an open password and a modify password, they will need the open password to view the file and the modify password to save changes.

The file remains encrypted on their computer. If they close it and reopen it later, they will need to enter the password again.

Removing or changing a password

To remove password protection, open the file and enter the password when prompted. Go to File > Info > Protect Workbook > Encrypt with Password (Windows) or File > Properties > Security > Password (Mac). The dialog will show your password as dots. Delete all the dots so the field is empty, then click OK. Save the file. The password protection is now removed.

To change the password, follow the same steps but enter a new password instead of leaving the field empty. Confirm the new password when prompted, then save the file.

When password protection is not enough

Password protection encrypts your file so it cannot be opened without the password. However, if someone has physical access to your computer or gains access to your email account, they might be able to find the file or intercept it. Password protection works best as one layer of security, not the only one.

If your spreadsheet contains very sensitive information — financial records, personal data, or confidential business information — consider additional steps. Store the file on an encrypted hard drive or in a cloud service that offers encryption, like Microsoft OneDrive with encryption enabled. Limit who you share the file with, and use a strong password that only you and the intended recipient know.

Frequently Asked Questions

Can I open a password-protected Excel file in Excel Online?

Excel Online will prompt you for the password when you try to open a file that was protected in the desktop version. However, you cannot set a password using Excel Online itself — you must use Excel on Windows or Mac to create the password protection first.

What if I forget the password to my Excel file?

Excel does not have a password recovery feature. If you forget the password, you cannot open the file. This is by design — it prevents someone else from recovering a password they do not know. Always store your password in a safe place.

Does password protecting an Excel file slow it down?

No. The file will open and save at the same speed as an unprotected file. The only difference is that you will see a password prompt when you open it.

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

Yes. You can protect individual sheets so people cannot edit them without a password, while still allowing the file to open freely. This is different from file-level password protection. Go to File > Protect Sheet (Windows) or Review > Protect Sheet (Mac) to set this up.

If I password protect a file, can someone still copy the data if they have the password?

Yes. Once someone enters the correct password and opens the file, they can copy, edit, or print the data just like you can. Password protection only controls who can open the file — it does not limit what they can do once it is open. If you need to prevent editing, use sheet protection instead.