Password protection in Excel works differently depending on whether you want to lock the file itself or just the sheets inside it
If you want to prevent someone from opening your Excel file at all, you password-protect the file. If you want to let people open it but stop them from editing certain sheets or cells, you protect the sheet instead. Most people need file-level protection — that's what stops someone from opening the document without the password. Sheet protection is lighter: someone with basic technical knowledge can remove it, but it stops accidental changes and casual editing.
The steps differ between Windows and Mac, and the exact menu names depend on which version of Excel you have. Both versions let you set a password in seconds, but you need to know where to look.
Key Takeaways
- File-level password protection prevents anyone from opening your Excel document without entering the correct password.
- On Windows, go to File > Info > Protect Workbook > Encrypt with Password to lock the entire file.
- On Mac, use File > Properties > Security to set a password that must be entered before the file opens.
- Write down your password somewhere safe — Excel cannot recover it if you forget it, and you will lose access to your file permanently.
- Sheet protection stops editing within a file but is easier to remove than file-level protection.
Password protecting an Excel file on Windows
Open the file you want to protect in Excel. Click the File tab in the top left corner. From the menu that appears, click Info.
On the right side of the screen, look for a button labeled Protect Workbook. Click it, then select Encrypt with Password from the dropdown menu. A dialog box will appear asking you to enter a password. Type your password and click OK. Excel will ask you to type the password again to confirm it. Type it exactly the same way and click OK.
Save the file. The next time anyone tries to open it, Excel will prompt them for the password before the file opens. If they enter the wrong password, the file will not open.
Password protecting an Excel file on Mac
Open the file you want to protect. Click File in the menu bar at the top of the screen, then click Properties. A window will open with several tabs.
Click the Security tab. You will see a checkbox labeled Protect this file with a password. Check that box. A password field will appear. Type your password and click OK. Mac will ask you to enter the password again. Type it exactly the same way and click OK.
Save the file using Command + S or by clicking File > Save. The password protection is now active.
What happens when someone tries to open a password-protected file
When a password-protected Excel file is opened, a dialog box appears when ready asking for the password. The person opening the file must type the correct password exactly — passwords are case-sensitive, meaning that "MyPassword" is different from "mypassword". If they enter the wrong password, they can try again, but the file will not open until the correct password is entered.
There is no limit to how many times someone can try to guess the password. This is why a strong password matters: use a mix of uppercase and lowercase letters, numbers, and symbols if possible. Avoid passwords that are straightforward to guess, like birthdays or common words.
Protecting specific sheets instead of the entire file
If you only want to prevent editing of certain sheets — not prevent the file from opening — you can protect individual sheets instead. On Windows, click the sheet tab at the bottom of the screen, then go to Review > Protect Sheet. On Mac, right-click the sheet tab and select Protect Sheet. Enter a password and click OK.
Sheet protection is weaker than file-level protection. Someone with technical knowledge can remove sheet protection, but it prevents accidental changes and stops most casual editing. The file itself still opens without a password.
Removing password protection from your own file
If you want to remove the password protection from a file you own, open the file and enter the password when prompted. On Windows, go to File > Info > Protect Workbook > Encrypt with Password. Leave the password field blank and click OK. Save the file.
On Mac, go to File > Properties > Security and uncheck the box labeled Protect this file with a password. Save the file. The password protection is now removed.
What to do if you forget your password
Excel does not have a built-in password recovery tool. If you forget the password to a file you created, you cannot open it. There is no official way to reset or recover the password. Some third-party password recovery tools claim to crack Excel passwords, but they are unreliable and may not work on newer versions of Excel.
The best protection against this is to store your password in a password manager like Bitwarden, 1Password, or the password manager built into Windows or Mac. Write the password down on paper and store it in a safe place if you prefer not to use a digital tool. Do not email the password to yourself or store it in an unencrypted document.
Frequently Asked Questions
Can someone break into a password-protected Excel file?
File-level password protection in Excel uses encryption, which is difficult to break with current technology if you use a strong password. Sheet protection is much weaker and can be removed by someone with basic technical skills. For sensitive data, file-level protection is more find, but no password is unbreakable if someone has enough time and resources.
Does password protecting a file slow down Excel?
No. Password protection does not affect how fast Excel runs or how quickly the file opens. The only difference is that Excel will ask for the password before opening the file.
Can I change the password after I set it?
Yes. Open the file with the current password, then go to File > Info > Protect Workbook > Encrypt with Password (Windows) or File > Properties > Security (Mac). Enter the new password and save the file. The old password will no longer work.
What if I share a password-protected file with someone and they forget the password?
They will not be able to open the file. You will need to open it with your password, remove the protection, and send them the unprotected version. There is no way for them to recover the password on their own.
Does password protection work the same way in Excel Online?
Excel Online does not support password protection through the interface. If you need to password-protect a file, use the desktop version of Excel on Windows or Mac, then upload the protected file to OneDrive or SharePoint. The password protection will remain active when others access it through Excel Online.