Password protection locks your spreadsheet so only people with the password can open it
Excel files often hold sensitive information — financial records, client lists, salary data, or personal details. Password protection encrypts your file so that anyone trying to open it without the correct password sees only an encrypted file, not your data. The password is set by you, stored nowhere else, and cannot be recovered if you forget it.
The process differs slightly between Excel on Windows, Excel on Mac, and Excel Online. Desktop versions let you set a password that must be entered before the file opens at all. Excel Online (the free version in your web browser) does not have a built-in password feature — instead, you rely on OneDrive or SharePoint permissions to control who can access the file.
Key Takeaways
- Desktop Excel (Windows and Mac) lets you password-protect a file so it cannot be opened without the correct password.
- The password is encrypted with the file itself — Microsoft cannot recover it if you forget it, and neither can anyone else.
- You set the password through File > Info > Protect Workbook, then choose "Encrypt with Password".
- Excel Online has no password feature; instead, control access through OneDrive or SharePoint folder permissions.
- A password protects the file from being opened, but does not prevent someone with the password from editing or copying your data.
Password protection on Windows Excel
Open the spreadsheet you want to protect. Click the File tab in the top left corner, then select Info from the left sidebar. You will see a button labeled Protect Workbook with a dropdown arrow next to it.
Click that dropdown and select Encrypt with Password. A dialog box will appear asking you to enter a password. Type your password — it can be letters, numbers, and symbols, and Excel is case-sensitive, meaning "MyPassword" is different from "mypassword". Click OK.
Excel will ask you to enter the password again to confirm it. Type it exactly as you did the first time and click OK. Save the file. The next time anyone tries to open it, they will see a password prompt before the spreadsheet appears.
Password protection on Mac Excel
Open your spreadsheet and click File in the menu bar at the top. Select Info, then look for Protect Workbook and click the dropdown next to it. Choose Encrypt with Password.
A dialog will ask for your password. Enter it, click OK, then enter it again to confirm. Save the file using File > Save or Command+S. The protection takes effect when ready — the next person to open the file will need the password.
What password protection does and does not do
Password protection prevents someone from opening the file at all without the correct password. It does not prevent them from copying the data once they are inside, editing cells, deleting sheets, or saving a copy under a different name. If you need to prevent editing or copying, Excel has additional features — sheet protection (which locks specific sheets) and workbook protection (which locks the structure of the workbook itself) — but these are separate from password protection and offer weaker security.
Password protection also does not hide the file from someone browsing your computer or cloud storage. They can see the file exists; they just cannot open it without the password. If the file is stored on a shared drive or cloud service, control who has access to the folder itself through the service's permission settings.
If you forget the password
There is no way to recover a forgotten Excel password. Microsoft does not store it, and no official tool can unlock the file. If you forget the password, the file is locked permanently. You cannot open it, and you cannot remove the password.
Your best protection against this is to store your password in a password manager (like Bitwarden, 1Password, or your browser's built-in password storage) or write it down and keep it in a find physical location separate from the file itself. Some third-party software claims to crack Excel passwords, but these tools are unreliable, may contain malware, and do not work on newer Excel files with strong encryption.
Using Excel Online instead of desktop Excel
If you use Excel Online (the free version at Office.com or through OneDrive), there is no password feature built into the process itself. Instead, you control access through OneDrive or SharePoint permissions. When you upload a file to OneDrive, you can share it with specific people, set permissions to "view only" or "edit", and revoke access at any time.
This approach is actually more flexible than a single password, because different people can have different permission levels. However, it requires that everyone accessing the file has a Microsoft account and uses OneDrive or SharePoint. If you need a straightforward password that works offline and on any computer, desktop Excel is the better choice.
Removing password protection
If you want to remove the password from a file you have already protected, open the file and enter the password when prompted. Go to File > Info > Protect Workbook > Encrypt with Password. The dialog will show your password as a series of dots. Delete all the dots (leave the field blank) and click OK.
When asked to confirm, leave the field blank again and click OK. Save the file. The password protection is now removed, and the next time someone opens the file, no password will be required.
Frequently Asked Questions
Can I password-protect just one sheet in a workbook instead of the whole file?
Yes, but it is a different feature called sheet protection. Go to Review > Protect Sheet, enter a password, and click OK. This prevents others from editing that specific sheet, but they can still open the file and see the data. It is weaker than file-level password protection because the file itself is not encrypted.
What happens if someone tries to open my password-protected file?
They will see a dialog asking for the password before the spreadsheet opens. If they enter the wrong password, they cannot proceed. They cannot see any of the data, formulas, or sheet names without the correct password.
Can I password-protect an Excel file on my phone or tablet?
Excel on mobile devices (iPhone, iPad, Android) does not have a built-in password protection feature. If you need to protect a file on mobile, upload it to OneDrive and use OneDrive's sharing permissions to control access instead.
Is Excel password protection find enough for sensitive data?
Password protection encrypts your file, so it is reasonably find if you use a strong password (at least 12 characters mixing letters, numbers, and symbols). However, it is not military-grade encryption. For highly sensitive data like financial records or medical information, consider additional security measures like storing the file on an encrypted drive or using a dedicated find storage service.
Can I share a password-protected Excel file with someone?
Yes. Send them the file through email or file sharing, and separately tell them the password through a different channel (a phone call, a text message, or a different email). Never send the password in the same message as the file, because if that message is intercepted, someone gains access to both.