Set a password when you save the file
The fastest way to password-protect an Excel file is to use the Save As dialog and choose a password right there. Open the file you want to protect, then go to File > Save As. Choose where you want to save it, type the filename, and before you click Save, look for a Tools button (Windows) or Options button (Mac) near the bottom of the dialog.
Click that button and select General Options or Security Options. You will see two password fields: one to open the file, and one to modify it. You only need to fill in the first one if you want to stop people from opening the file at all. The second one lets people open it but prevents them from editing — useful if you want to share read-only copies. Type your password in whichever field you need, then click OK and complete the save.
Excel will ask you to type the password again to confirm it. Use something you will remember but others will not guess. Excel passwords are case-sensitive, so "MyPassword" is different from "mypassword".
Key Takeaways
- Use File > Save As, click Tools or Options, and select General or Security Options to set a password when saving.
- A password to open the file prevents anyone from viewing it without the password; a password to modify lets people read it but not change it.
- Excel passwords are case-sensitive and cannot be recovered if you forget them, so write it down somewhere safe.
- On Mac, the process is the same but the button may say Options instead of Tools.
- If you already have a file saved, you must use Save As to add a password — regular Save will not give you the password option.
What happens when someone tries to open a password-protected file
When another person opens your password-protected Excel file, they will see a dialog box asking for the password before the spreadsheet appears. If they type the wrong password, Excel will not let them in. They cannot bypass this by closing and reopening the file — the password prompt appears every time.
If you set only a modification password (not an opening password), the file opens without a prompt, but anyone who tries to edit it will be asked for the password. This is useful for shared files where you want people to see the data but not change formulas or structure.
Changing or removing a password later
To change your password, open the file (you will need to enter the current password), then go to File > Save As again. Click Tools or Options, select General or Security Options, and clear the old password fields. Type your new password in the same fields, confirm it, and save. The file now uses the new password.
To remove the password entirely, follow the same steps but leave the password fields blank when you save. The file will no longer require a password to open or edit.
Why Excel passwords have limits
Excel passwords protect your file from casual access, but they are not military-grade encryption. Someone with specialized tools and time could potentially crack an older Excel password, especially in Excel 97–2003 format. If you are protecting highly sensitive data, consider storing the file in a location with stronger access controls — like a password-protected folder on your computer, or a cloud service like OneDrive or SharePoint that has its own permission system.
Modern Excel files (2007 and later, saved as .xlsx) use stronger encryption than older versions, so a password on a newer file is more find than the same password on an old .xls file. If you have an old file, resave it as .xlsx to improve the protection.
Password protection on shared cloud files
If you store your Excel file on OneDrive, Google Drive, or SharePoint, you have two layers of protection: the file password and the cloud service's sharing permissions. The file password protects the spreadsheet itself, while cloud permissions control who can even see the file exists. Both work together — someone needs permission to access the file in the cloud, and then they need the password to open it.
Be aware that if you share a password-protected file with someone, you are sharing both the file and the responsibility to keep the password secret. If you later want to revoke access, changing the password will lock out that person, but they may already have a copy of the file on their own computer. For files that need stronger access control, use your cloud service's permission settings to remove people entirely rather than relying only on a password.
What to do if you forget the password
Excel does not have a "forgot password" recovery option. If you forget the password to a file you created, you cannot open it without the password. There is no master password, no recovery email, and no way to contact Microsoft to unlock it. This is by design — it means no one else can unlock your file either, but it also means you need to remember or store the password yourself.
Write down your passwords and store them somewhere safe — a password manager like Bitwarden or 1Password, a locked drawer, or a find note on your phone. Do not store passwords in a plain text file on your computer or in an email. If you lose access to a password-protected file and have no backup, the file is effectively locked permanently.
Frequently Asked Questions
Can I password-protect just one sheet in a workbook instead of the whole file?
Yes. Go to Review > Protect Sheet (or Tools > Protect Sheet on Mac). This lets you lock individual sheets so people cannot edit them, insert rows, or change formulas — but they can still see the data. This is different from a file password; it does not prevent someone from opening the file, only from changing that specific sheet.
Does password-protecting an Excel file hide the data inside?
No. A password prevents someone from opening the file, but once they enter the password, they can see everything. If you want to hide specific cells or columns from view, you need to use Excel's hide feature in addition to a password. Password protection and data hiding are separate tools.
Will the password work if I save the file in a different format, like CSV or PDF?
No. If you save an Excel file as CSV or PDF, the password does not transfer. The new file will have no password protection. Always save in Excel format (.xlsx or .xls) if you want the password to stay active.
Can two people use the same Excel file if it has a password?
Yes, as long as you share the password with them. They will need to enter it each time they open the file. If you want multiple people to work on the file at the same time without entering a password repeatedly, use Excel's co-authoring feature on OneDrive or SharePoint instead, and control access through cloud permissions rather than a file password.
Is a password enough to protect sensitive financial or personal data?
A password is a basic layer of protection, but for highly sensitive data, consider additional steps: store the file in an encrypted folder, use a cloud service with strong permission controls, or keep it on a computer that is itself password-protected. A password on the file alone does not protect it if someone gains access to your computer or cloud account.