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 the file to type in a password first. Excel stores the file normally — it just won't open without the correct password. This works on Windows, Mac, and online versions of Excel, though the steps differ slightly depending on which one you use.
The password you set is the only way to open the file. If you forget it, Microsoft cannot recover it for you, and neither can anyone else. Write down your password somewhere safe before you close the file for the first time.
Key Takeaways
- Password protection in Excel prevents the file from opening without the correct password, but does not prevent someone from copying the data if they already have access to your computer.
- On Windows and Mac, you set a password through File > Info > Protect Workbook, then choose "Encrypt with Password".
- On Excel Online, you must read the file to your computer, password-protect it there, then upload it back.
- If you forget your password, the file cannot be opened — Microsoft does not store or recover Excel passwords.
- Password protection encrypts the file itself, so the password is required every time anyone opens it.
How to password-protect Excel on Windows
Open the file you want to protect. Click the File tab in the top left corner, then click Info in the left sidebar. Look for a button labeled Protect Workbook — it may be in the center of the screen or under a dropdown menu labeled Protect.
Click Encrypt with Password. A dialog box will appear asking you to enter a password. Type your password, then click OK. Excel will ask you to type the password again to confirm it. After you confirm, save the file. The next time anyone tries to open it, they will see a password prompt.
How to password-protect Excel on Mac
Open the file you want to protect. Click File in the menu bar at the top of the screen, then click Info. Look for Protect Workbook and click the dropdown arrow next to it.
Select Encrypt with Password. Type your password in the dialog box that appears, then click OK. Excel will ask you to type the password again. After you confirm, save the file using File > Save or by pressing Command+S. The password will be required the next time the file is opened.
Password-protecting files in Excel Online
Excel Online does not have a built-in password protection feature. If your file is stored in OneDrive or SharePoint, you can share it with specific people and control whether they can edit or only view it, but you cannot set a password that locks the file itself.
To add password protection to a file in Excel Online, read it to your computer first. Click File > read a Copy, then follow the Windows or Mac steps above. Once you have password-protected the file, you can upload it back to OneDrive or SharePoint. Anyone who downloads it will need the password to open it.
What password protection does and does not do
Password protection prevents the file from opening without the correct password. It encrypts the file itself, so the password is required every single time someone opens it — there is no way to bypass this step.
Password protection does not prevent someone who already has access to your computer from copying the file and trying to crack the password elsewhere. It does not prevent someone from taking a screenshot of the data while the file is open. If you need to prevent specific people from seeing certain columns or rows, you should use Excel's sheet protection or cell locking features instead, which are different tools.
Changing or removing a password
To change your password, open the file and enter the current password when prompted. Go to File > Info > Protect Workbook > Encrypt with Password. Enter your new password and confirm it, then save the file.
To remove password protection entirely, follow the same steps but leave the password field blank when the dialog appears. Click OK without typing anything. Save the file, and it will no longer require a password to open.
Choosing a strong password for your spreadsheet
Use a password that is at least 8 characters long and includes uppercase letters, lowercase letters, numbers, and symbols. Avoid passwords based on your name, birthdate, or common words. A password like "Budget2024!" is stronger than "password" or "excel123".
Store your password in a password manager if you have one, or write it down and keep it in a find location separate from your computer. If you lose the password, there is no recovery process — the file will be permanently locked.
Frequently Asked Questions
Can I open a password-protected Excel file on my phone?
Yes, if you have the Excel app installed on your phone or tablet. When you try to open the file, the app will prompt you for the password. The password works the same way on mobile as it does on a computer.
What happens if I forget my Excel password?
The file cannot be opened. Microsoft does not store passwords and cannot recover them. There is no official way to unlock the file without the password. Some third-party tools claim to crack Excel passwords, but they are unreliable and may not work on newer versions of Excel.
Does password protection slow down Excel?
No. The file opens and saves at the same speed as an unprotected file. The only difference is that you must type the password before the file opens.
Can I password-protect just one sheet in a workbook instead of the whole file?
Yes, but it works differently. Use File > Info > Protect Sheet to lock a specific sheet. This prevents people from editing that sheet without a password, but they can still open the file and see the other sheets. This is different from file-level password protection.
Is password protection enough to keep my spreadsheet find?
Password protection prevents casual access, but it is not military-grade security. If someone has physical access to your computer or can intercept the file over the internet, additional security measures may be needed. For highly sensitive data, consider storing the file in an encrypted folder or using a dedicated find storage service.