Password protection locks your spreadsheet so only people with the password can open it
When you password-protect an Excel file, you're adding a lock that requires anyone opening it to type in a password first. Excel stores the file normally — it just won't open without the correct password. This works on both Windows and Mac, and the protection stays with the file if you email it or move it to another computer.
The process takes about one minute and uses features built into Excel itself. You don't need extra software or online services. Once you set a password, you'll need to remember it — Excel cannot recover a forgotten password, and there's no "forgot password" button.
Key Takeaways
- Password protection in Excel prevents the file from opening without the correct password, but does not prevent someone from copying the file or changing its location.
- On Windows, use File > Info > Protect Workbook > Encrypt with Password; on Mac, use File > Properties > Security.
- Write down your password somewhere safe before you close the file, because Excel cannot recover a forgotten password.
- Password protection encrypts the file itself, so the password travels with it if you email or share the file.
How to password-protect a file on Windows
Open the Excel file you want to protect. Click the File tab in the top left corner, then click Info on the left side of the screen. Look for a button labeled "Protect Workbook" — it usually has a lock icon next to it. Click that button and select "Encrypt with Password" from the dropdown menu.
A dialog box will appear asking you to enter a password. Type the password you want to use. Excel will not show you the characters as you type — you'll see dots or asterisks instead. Click OK. Excel will ask you to type the password again to confirm you didn't make a typo. Type it exactly the same way and click OK. Save the file. The next time anyone opens this file, Excel will ask for the password before showing the spreadsheet.
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 of the screen, then click Properties. In the Properties window, look for a Security section. You should see a checkbox labeled "Protect this file with a password" or similar wording. Check that box.
A dialog will appear asking you to create a password. Type your password, then type it again in the confirmation field. Click OK or Save. Close the Properties window and save your file. The password protection is now active.
What happens when someone tries to open a protected file
When you or anyone else tries to open a password-protected Excel file, a password prompt appears before the spreadsheet loads. The person must type the correct password to proceed. If they type the wrong password, Excel shows an error message and returns to the password prompt. They can try again as many times as they want — Excel does not lock them out after failed attempts.
If someone enters the correct password, the file opens normally and they can edit, save, and work with it like any other spreadsheet. The password does not restrict what they can do once inside the file — it only controls whether they can open it at all.
Important limits of password protection
Password protection prevents opening the file, but it does not prevent someone from copying the file itself to another location or device. If you email a protected file to someone, they receive the locked file — but they could also forward it to others, and it stays locked for all of them. Password protection also does not hide the file from view in Windows Explorer or Finder; it only locks it when opened.
If you forget the password, Excel cannot recover it. There is no master password, no recovery email, and no way to bypass it. You will not be able to open that file again. For this reason, write down your password in a safe place — a password manager, a locked drawer, or another find location — before you close the file for the first time.
The difference between file password and sheet protection
Excel offers two separate protection features that do different things. File password protection (what this article covers) locks the entire file so it won't open without a password. Sheet protection is different — it lets you lock specific cells or sheets within a file that is already open, preventing people from editing certain parts while leaving other parts editable.
Sheet protection is weaker than file protection because someone who knows how can remove it without a password. File password protection is stronger because the file itself cannot open without the correct password. If you want to prevent someone from opening the file at all, use file password protection. If you want to let someone open the file but prevent them from editing certain cells, use sheet protection instead.
Removing or changing a password
To remove a password from an Excel file, open the file and enter the password when prompted. Once the file is open, follow the same steps you used to set the password: on Windows, go to File > Info > Protect Workbook > Encrypt with Password. On Mac, go to File > Properties > Security. This time, leave the password field blank and click OK. Save the file. The password protection is now removed.
To change a password, open the file with the current password, then follow the same steps but enter a new password instead of leaving it blank. Save the file. The old password will no longer work, and only the new password will open the file.
Frequently Asked Questions
Can I password-protect just one sheet instead of the whole file?
Yes, but that's sheet protection, not file protection. Sheet protection lets people open the file but prevents them from editing certain sheets or cells. It's weaker than file protection because someone determined enough can remove it. If you want to lock the entire file so it won't open at all, use file password protection instead.
What if I password-protect a file and then forget the password?
Excel cannot recover or reset a forgotten password. You will not be able to open that file again. There is no recovery process, no master password, and no way to bypass it. This is why you should write down your password in a safe place before you close the file for the first time.
Does password protection work if I email the file to someone?
Yes. The password protection stays with the file no matter where it goes. When the person receives the email and tries to open the attachment, Excel will ask for the password. They cannot open it without entering the correct password, even though you sent it to them.
Can someone remove the password if they have the file?
Not without knowing the password. File password protection in Excel uses encryption, which means the file itself is scrambled in a way that requires the correct password to unscramble. Someone cannot open, copy, or read the file without the password.
Does password protection slow down Excel or change how the file works?
No. Once the file is open, it works exactly the same as an unprotected file. The password only affects the moment when someone tries to open it. There is no performance difference, and all formulas, macros, and features work normally.