Password protection in Excel works differently depending on whether you use Windows or Mac
To password protect an Excel file, you open the file, go to File > Info > Protect Workbook, and choose either "Encrypt with Password" (Windows) or "Protect Workbook" (Mac). You then type a password twice and save the file. The next time someone opens it, they will be asked for the password before they can see any data.
The process takes about two minutes. What matters most is that you choose a password you will actually remember — Excel cannot recover a forgotten password, and there is no "forgot password" button. If you lose the password, the file becomes inaccessible.
Key Takeaways
- Excel password protection prevents anyone without the password from opening the file at all, not just from editing it.
- Windows and Mac have slightly different menu paths, but both are found under File > Info or File > Properties.
- You must type the password twice to confirm it, and Excel will not show you what you typed, so write it down before you close the dialog.
- If you forget the password, there is no recovery method — the file will be permanently locked.
How to password protect a file on Windows
Open the Excel file you want to protect. Click the File tab at the top left of the screen. From the menu on the left, click Info.
On the right side of the screen, you will see a button that says "Protect Workbook." Click the dropdown arrow next to it and select "Encrypt with Password." A dialog box will appear with a single text field labeled "Password."
Type your password in the field. The text will appear as dots or asterisks so no one looking at your screen can see what you typed. Click OK. Excel will ask you to type the password again to confirm it. Type it exactly the same way — passwords are case-sensitive, so "MyPassword" is different from "mypassword." Click OK again.
Save the file using Ctrl+S or File > Save. The password protection is now active. The next time you or anyone else opens this file, Excel will ask for the password before showing any content.
How to password protect a file on Mac
Open the Excel file you want to protect. Click File in the menu bar at the top. From the dropdown menu, click "Properties" (in newer versions of Excel for Mac, this may appear as "Info").
In the Properties window, look for the "Protect Workbook" section. Click the dropdown next to it and select "Encrypt with Password." A dialog will appear asking you to enter a password.
Type your password and click OK. Mac will ask you to type it again to confirm. Make sure you type it exactly the same way, including capital letters and numbers. Click OK.
Save the file using Command+S or File > Save. The password protection is now active.
The difference between password protecting the file and protecting the sheet
When you encrypt a file with a password, no one can open it without that password. When you protect a sheet, people can open the file but cannot edit specific cells, columns, or rows without a password. These are two separate features.
Most people who want password protection want the file-level encryption described above — they do not want anyone to see the file at all. Sheet protection is useful if you want to share a file with colleagues but prevent them from accidentally changing formulas or deleting important data. You can use both at the same time if you need to.
What happens when you password protect a file
Once you save a password-protected file, Excel encrypts all the data inside it. The file itself becomes unreadable without the correct password. When someone tries to open it, they see a password prompt before the file loads. If they type the wrong password, the file does not open.
Password protection stays in place every time the file is opened, even if you email it to someone else or move it to a different computer. The protection does not expire and cannot be bypassed without the correct password.
How to remove or change a password
To remove a password, open the file (you will need to enter the current password). Go to File > Info > Protect Workbook > Encrypt with Password (Windows) or File > Properties > Protect Workbook > Encrypt with Password (Mac). The password field will be empty. Leave it empty and click OK, then save the file. The password protection is now removed.
To change the password, follow the same steps but type a new password instead of leaving the field empty. You do not need to know the old password to change it — you only need to be able to open the file, which requires knowing the current password.
Common mistakes that lock you out of your own file
The most common mistake is forgetting the password. Excel does not have a password recovery feature. If you forget it, the file is locked permanently and cannot be opened. Write down your password and store it somewhere safe before you close the dialog box.
The second common mistake is typing the password differently the second time. Passwords are case-sensitive and must match exactly. If you type "MyPassword" the first time and "mypassword" the second time, the passwords will not match and the dialog will ask you to try again. Type slowly and carefully, or paste the password from a text editor if you are unsure.
A third mistake is password protecting a file and then forgetting which file is protected. If you protect multiple files, keep a list of which ones have passwords and what those passwords are. Store the list separately from the files themselves.
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 and select "Protect Sheet." You can then set a password that prevents others from editing that specific sheet while leaving other sheets in the same workbook unprotected. This is different from file-level encryption and is useful when you want to share a workbook but lock down certain tabs.
What if I password protect a file and then forget the password?
There is no way to recover the password or open the file. Excel does not have a "forgot password" feature, and the encryption cannot be bypassed. This is why you should write down the password and store it in a safe place before you close the protection dialog. If you forget it, the file is permanently inaccessible.
Does password protecting an Excel file prevent people from copying the data if they have the password?
No. Once someone enters the correct password and opens the file, they can copy, edit, and save the data just like you can. Password protection only prevents them from opening the file in the first place. If you need to prevent editing after the file is open, use sheet protection instead of file encryption.
Can I password protect an Excel file that is stored in OneDrive or SharePoint?
Yes. The password protection process is the same whether the file is on your computer or in cloud storage. However, if you share the file with others through OneDrive or SharePoint, they will need the password to open it. The password protection applies to the file itself, not to the sharing settings.
Is password protection the same as making a file read-only?
No. Read-only means people can open and view the file but cannot save changes to it. Password protection means people cannot open the file at all without the password. Read-only is a weaker form of protection and can be turned off by the person opening the file. Password protection is stronger because it prevents access entirely.