The quickest way to password-protect your Excel file
Open the file you want to protect in Excel. Click File in the top left, then select Info. Look for the button labeled Protect Workbook — on Windows it appears in the right panel; on Mac it's under the Tools menu instead. Choose Encrypt with Password. Type your password twice to confirm it, then click OK. Save the file. The next time anyone opens it, Excel will ask for the password before the spreadsheet appears.
This method encrypts the entire file, so the password is required just to open it at all. If you only want to prevent editing — allowing people to view the file but not change it — you have a different option that we'll cover below.
Key Takeaways
- The Encrypt with Password option in the File menu locks the entire file and requires a password to open it.
- On Windows, find this option under File > Info > Protect Workbook; on Mac, use File > Tools > Protect Workbook.
- You can also restrict editing only, allowing people to open the file but not make changes, without requiring a password to view it.
- Excel does not show your password as you type it, so write it down somewhere safe before you forget it — there is no recovery option if you lose it.
- If you share the file with others, they will need the password every single time they open it, so consider whether a view-only restriction might work better.
Protecting just the sheets or cells, not the whole file
If you want people to open the file without a password but prevent them from editing specific sheets or cells, Excel offers a lighter restriction. Click File, then Info, then Protect Workbook (Windows) or Tools > Protect Workbook (Mac). This time, choose Protect Current Sheet or Protect Workbook Structure depending on what you want to lock.
When you choose Protect Current Sheet, you can set a password, but it's optional — you can leave it blank and just prevent editing without requiring a password. This is useful if you want to share a file where people can view and use formulas but cannot accidentally (or intentionally) change your data. The person opening the file sees a message that the sheet is protected, but they don't need a password to view it.
The difference between file encryption and sheet protection
File encryption (Encrypt with Password) locks the entire file. No one can open it, see any data, or do anything without the password. This is the strongest option and the one to use if the file contains sensitive information like financial records, personal details, or confidential business data.
Sheet protection lets people open and view the file but prevents them from editing cells, deleting sheets, or changing formulas. You can choose which specific actions to allow — for example, you might let people sort and filter data but not delete rows. This is useful for shared workbooks where you want to prevent accidental changes or keep certain data locked while allowing work in other areas.
If you use sheet protection with a password, the password only matters if someone tries to unprotect the sheet. Without the password, they cannot remove the protection. If you use it without a password, anyone can unprotect the sheet by going to the same menu and clicking the unprotect option.
Setting up sheet protection with specific restrictions
Click File, then Info, then Protect Workbook (or Tools > Protect Workbook on Mac). Select Protect Current Sheet. A dialog box appears with a list of checkboxes showing what users are allowed to do — by default, most actions are blocked. You can check the boxes for actions you want to allow, such as Select locked cells, Sort, or Use AutoFilter.
Type a password if you want one (optional), then click OK. If you entered a password, type it again to confirm. Now the sheet is protected with those restrictions in place. Users can still open the file and work within the allowed actions, but they cannot modify protected cells or perform blocked actions.
What happens when someone tries to open or edit a protected file
If you encrypted the entire file with a password, Excel shows a password prompt before the file opens. The person must type the correct password or they cannot proceed. If they type the wrong password, they get an error message and can try again, but there is no limit to how many times they can attempt it.
If you protected only the sheet or cells, the file opens normally. When someone tries to edit a protected cell, a small dialog appears saying the sheet is protected and they cannot make that change. If you set a password on the sheet protection, they have the option to unprotect the sheet — but they need the password to do so.
Removing or changing a password later
To remove file encryption, open the file (you'll need the password), go to File > Info > Protect Workbook (Windows) or File > Tools > Protect Workbook (Mac), and click Encrypt with Password. The password field will be empty. Leave it empty and click OK. The file is no longer encrypted.
To change the password, follow the same steps but type your new password instead of leaving it blank. To remove sheet protection, go to File > Info > Protect Workbook > Protect Current Sheet (or the sheet you want to unprotect). If there is no password on the sheet, it unprotects when ready. If there is a password, Excel asks you to enter it first.
Important things to know before you password-protect
Excel does not store your password anywhere and cannot recover it if you forget it. If you encrypt a file with a password and then forget the password, you cannot open the file. There is no "forgot password" recovery option, no backup key, and no way to bypass it. Write down your password and store it somewhere safe — a password manager, a locked drawer, or another find location.
If you share a password-protected file with others, they will need the password every time they open it. This can become annoying if many people need access. Consider whether sheet protection (which can work without a password) might be a better fit for your situation. Also, if you email the file and the password separately, send them through different channels — never send both in the same email.
Password protection in Excel is not military-grade encryption. It is sufficient to prevent casual access and accidental changes, but determined users with technical knowledge may be able to work around it. If you need to protect highly sensitive data, consider additional security measures like storing the file on an encrypted drive or using a dedicated find file-sharing service.
Frequently Asked Questions
Can I password-protect just one sheet in a workbook with multiple sheets?
Yes. Click on the sheet tab at the bottom of the screen to select the sheet you want to protect, then go to File > Info > Protect Workbook > Protect Current Sheet. Only that sheet will be protected; other sheets in the same file remain unprotected and editable.
What if I forget the password to my encrypted file?
Excel cannot recover a forgotten password. The file will remain locked and unopenable. There is no built-in recovery process. To prevent this, store your password in a password manager or write it down and keep it in a find location separate from the file itself.
Can someone remove the password protection if they have the file?
If you encrypted the entire file, they cannot open it without the password. If you protected only the sheet and did not set a password, they can unprotect it by going to the same menu. If you protected the sheet with a password, they need that password to unprotect it.
Is there a difference between password protection on Excel for Windows and Excel for Mac?
The feature works the same way on both, but the menu location is slightly different. On Windows, use File > Info > Protect Workbook. On Mac, use File > Tools > Protect Workbook. The password itself works across both versions — a file encrypted on Windows opens on Mac with the same password.
Can I use sheet protection and file encryption at the same time?
Yes. You can encrypt the entire file with a password so it cannot be opened without one, and also protect individual sheets within it to prevent editing. This creates two layers of protection — one to open the file and one to edit specific content.