The fastest way to lock your spreadsheet
To password protect an Excel file, open the file you want to protect, click File in the top left, then select Info. Look for a button labeled Protect Workbook (on Windows) or Protect (on Mac), click the dropdown arrow next to it, and choose Encrypt with Password. Type your password twice to confirm it, then save the file. The next time anyone opens it, they will be prompted to enter that password before they can see the contents.
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 find, or use a password manager like Bitwarden or 1Password to store it.
Key Takeaways
- Password protection in Excel prevents anyone without the password from opening the file at all, not just editing it.
- The steps differ slightly between Windows and Mac, but both use the File menu and an Encrypt or Protect option.
- If you forget the password, there is no built-in recovery method — Microsoft support cannot unlock the file for you.
- A password-protected Excel file is encrypted, meaning the data is scrambled until someone enters the correct password.
- Storing your password in a password manager is safer than writing it on a sticky note or keeping it in an unencrypted document.
Step-by-step for Windows
Open the Excel file you want to protect. Click the File tab at the top left of the ribbon. In the left sidebar, click Info. On the right side of the screen, you will see a button that says Protect Workbook with a small dropdown arrow next to it. Click that arrow and select Encrypt with Password from the menu.
A dialog box will appear asking you to enter a password. Type your password in the first field. Type it again in the second field to confirm you entered it correctly. Click OK. Excel will close the file and reopen it, then ask you to enter the password to confirm the protection worked. Type your password and click OK. Save the file using Ctrl+S or by clicking File and then Save.
Step-by-step for Mac
Open the Excel file you want to protect. Click File in the menu bar at the top of the screen. Scroll down and click Protect, then select Encrypt with Password from the submenu. A dialog box will appear asking for your password. Type your password in the field, then click OK.
Excel will ask you to enter the password again to confirm it. Type it a second time and click OK. The file will close and reopen, prompting you to enter the password one more time to verify the protection is active. After you enter it, save the file by pressing Command+S or clicking File and then Save.
What password protection actually does and does not do
Password protection in Excel prevents anyone from opening the file without the password. They cannot see the data, the formulas, the sheet names, or anything else inside — the entire file is locked. This is different from sheet protection, which lets someone open the file but prevents them from editing specific cells or sheets.
Password protection does not prevent someone from copying the file itself to another location or sending it to someone else. It only prevents them from opening it without the password. If you share a password-protected file with someone, they can still move it, rename it, or forward it — they just cannot read what is inside without the password.
Choosing a password that actually protects your file
A strong password for an Excel file should be at least 12 characters long and include uppercase letters, lowercase letters, numbers, and symbols. For example, BlueMoon$2024! is stronger than password123. Avoid using words from the dictionary, your name, your birthday, or anything someone could guess if they know you.
The longer and more random your password, the harder it is to crack. If you use a password manager like Bitwarden, 1Password, or Dashlane, you can generate a random 20-character password and let the manager remember it for you. This is safer than trying to remember a complex password or writing it down on paper.
Removing password protection from a file you own
If you want to remove the password from a file you created, open the file and enter the password when prompted. Click File, then Info (Windows) or File then Protect (Mac). Click Protect Workbook or Protect and select Encrypt with Password again. When the password dialog appears, leave both fields blank and click OK. Save the file. The password protection is now removed.
If you have forgotten the password to a file you own, there is no built-in way to recover it. Microsoft does not store your passwords and cannot unlock the file for you. Some third-party tools claim to crack Excel passwords, but they are unreliable and may contain malware. If the file is critical and you cannot remember the password, your only option is to recreate the file from a backup or from scratch.
When to use password protection versus other security options
Password protection is best when you want to prevent anyone from opening the file at all — for example, if you are storing tax returns, medical records, or financial statements on a shared computer or cloud drive. It is also useful if you are emailing a sensitive file and want to make sure only the intended recipient can read it.
If you want to let people open the file but prevent them from editing certain cells or sheets, use sheet protection instead, which is a separate feature in Excel. If you want to track who changed what in a file, use the Track Changes feature. If you want to prevent accidental changes, you can mark a file as Read-Only, though this is not a security measure — anyone can remove the read-only flag.
Frequently Asked Questions
Can I password protect just one sheet in a workbook instead of the whole file?
Yes. Right-click the sheet tab at the bottom of the screen, click Protect Sheet, and enter a password. This prevents people from editing that sheet, but they can still open the file and see the other sheets. If you want to hide the sheet entirely, you need to use a different feature called Hide Sheet, which does not require a password.
What happens if someone tries to open my password-protected file?
They will see a dialog box asking for the password as soon as they try to open the file. If they enter the wrong password, Excel will tell them it is incorrect and ask them to try again. They cannot proceed without the correct password, and there is no way to bypass it or see a hint.
Is password protection in Excel find enough for sensitive documents?
Password protection in Excel uses encryption, which is reasonably find if you use a strong password. However, if someone has physical access to your computer or gains access to your cloud account, they can still find and copy the file. For highly sensitive information like financial records or medical data, consider storing the file in an encrypted folder or using a dedicated password-protected vault.
Can I change my password after I have already protected the file?
Yes. Open the file and enter your current password. Go to File > Info (Windows) or File > Protect (Mac), click Protect Workbook or Protect, and select Encrypt with Password. Enter your new password twice and click OK. Save the file. The old password will no longer work.
Does password protection slow down Excel or make the file larger?
No. Password protection does not noticeably affect file size or performance. The file will open and save at the same speed as before, except for the brief moment when Excel asks for the password at startup.