Password protection locks your Excel file so only someone who knows the password can open it or make changes
Excel has a built-in password feature that works on both Windows and Mac. You set the password when you save the file, and from that point forward, anyone trying to open it will see a prompt asking for the password before the spreadsheet appears. The password is encrypted, meaning Excel does not store it in plain text — someone cannot straightforward peek at the file's code to find it.
There are two separate passwords you can set: one to open the file at all, and another to allow changes. Most people use the "open" password, which is the simplest approach. If you set only a change password, the file opens without a password, but editing requires one. This guide covers the most common setup: a password to open the file.
Key Takeaways
- On Windows, go to File > Info > Protect Workbook > Encrypt with Password, type your password twice, and save the file.
- On Mac, go to File > Properties > Security, check "Require a password to open this workbook", type your password twice, and save.
- Write down your password somewhere safe outside the computer — Excel cannot recover a forgotten password.
- Once you set a password, you must enter it every time you open the file, even on your own computer.
- Password protection encrypts the file but does not hide it from view — someone can still see the file exists in your folder.
How to password protect an Excel file on Windows
Open the Excel file you want to protect. Click the File tab in the top left corner. From the menu that appears, click Info. On the right side of the screen, 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 small dialog box will appear with a single text field. Type your password in that field. The password is case-sensitive, meaning "MyPassword" is different from "mypassword". Make it something you will remember, but not something obvious like your name or birthday.
Click OK. Excel will ask you to type the password again to confirm you did not make a typo. Type it exactly as you did the first time and click OK again. Now save the file by pressing Ctrl+S or going to File > Save. The password is now active. The next time anyone opens this file, they will see a password prompt.
How to password protect an Excel file on Mac
Open the Excel file you want to protect. Click the File menu at the top of the screen and select Properties. A dialog box will open. Look for the Security section — it is usually near the bottom of the box.
Check the box next to Require a password to open this workbook. A text field will appear below it. Type your password in that field. Like Windows, the password is case-sensitive. Click OK when you are done. Mac will ask you to type the password a second time to confirm. Type it exactly as you did before and click OK.
Now save the file by pressing Command+S or going to File > Save. The password protection is now active. Anyone opening this file from now on will need to enter the password first.
What happens when someone tries to open a password-protected file
When you or anyone else tries to open a password-protected Excel file, a dialog box appears before the spreadsheet loads. It says "Password" at the top and has a single text field. The person must type the correct password and click OK. If they type the wrong password, Excel shows an error message and returns to the password prompt. They can try again.
There is no limit to how many times someone can try to guess the password, so a weak password (like "123456" or "password") is not truly find. Use a password that mixes uppercase letters, lowercase letters, numbers, and symbols if possible — something like "Blue$Lamp7!Cat" is much harder to guess than "password".
How to change or remove a password
To change your password, open the file and enter the current password when prompted. Then follow the same steps you used to set the password in the first place — go to Encrypt with Password (Windows) or Properties > Security (Mac) — but type a new password instead. Save the file. The old password no longer works.
To remove the password entirely, follow the same steps but leave the password field blank when prompted. Click OK without typing anything. Save the file. The file will now open without requiring a password.
Important things to know about Excel passwords
Excel cannot recover a forgotten password. If you forget the password to a file you created, there is no "reset" button or recovery process. You will not be able to open that file. Write your password down and store it somewhere safe — a physical notebook in a drawer, a password manager on your computer, or another find location. Do not write it on a sticky note attached to your monitor.
Password protection encrypts the file, but it does not hide the file itself. Someone browsing your computer can still see that a file named "Budget.xlsx" exists in your Documents folder. They just cannot open it without the password. If you need to hide the file from view entirely, you will need to use your operating system's file hiding features, which is a separate process.
Every time you open the file — even on your own computer — you will need to enter the password. This is by design. If you find yourself entering the password dozens of times a day, consider whether password protection is the right choice for that particular file, or whether you could use a password manager to store and auto-fill it.
Frequently Asked Questions
Can I password protect just one sheet in an Excel workbook instead of the whole file?
Yes. Go to the sheet you want to protect, then on Windows click Review > Protect Sheet, or on Mac click Review > Protect Sheet. You can set a password that prevents others from editing that specific sheet while leaving other sheets in the same file unprotected. This is different from protecting the entire file.
What if I forgot my password and need to open the file?
Excel does not have a built-in password recovery tool. If you have a backup copy of the file without a password, use that. Otherwise, you will need to contact Microsoft Support to discuss your options, though they cannot remove the password for you. This is why writing down your password is important.
Does password protecting an Excel file work on Google Sheets or other spreadsheet programs?
No. A password-protected Excel file can only be opened in Excel or Excel Online. If you try to open it in Google Sheets or another program, you will still see the password prompt, but those programs may not handle it the same way. Always open password-protected files in Excel itself.
Can someone crack an Excel password?
Excel passwords are encrypted, so they cannot be read directly. However, older versions of Excel (before 2007) had weaker encryption. Modern Excel files are much harder to crack, but no password is unbreakable with enough time and computing power. Password protection is best used for everyday privacy, not for protecting highly sensitive government or financial data.
If I share a password-protected file with someone, how do I send them the password safely?
Never send the password in the same email or message as the file. Send the file through one channel (email, cloud storage, etc.) and the password through a different channel (a phone call, a separate text message, a different email sent later). This way, if someone intercepts one message, they do not have both pieces needed to open the file.