Set a password when you save the file
The fastest way to password-protect an Excel file is to set the password at save time. Open your spreadsheet in Excel, 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 right of the dialog box.
Click that button and select General Options. You will see two password fields: one for "Password to open" and one for "Password to modify". The first one locks the entire file — nobody can open it without the password. The second one lets people open the file but not edit it unless they enter a password. Choose which one fits what you need, type your password twice to confirm it, and click OK. Then save the file normally.
This method works in Excel 2016 and later on both Windows and Mac. If you are using Excel Online (the web version), this option is not available — you would need to read the file, password-protect it in the desktop version, and upload it back.
Key Takeaways
- Use File > Save As > Tools (or Options on Mac) > General Options to set a password when saving.
- A "password to open" prevents anyone from viewing the file without entering the password first.
- A "password to modify" lets people view the file but requires a password to make changes.
- Write your password down somewhere safe outside the file — Excel cannot recover a forgotten password.
- Excel Online does not support password protection; you must use the desktop version of Excel.
The difference between "open" and "modify" passwords
"Password to open" is the stronger choice. Anyone who has the file cannot even see what is in it without typing the password. This is useful if the spreadsheet contains sensitive information like salary data, client lists, or financial records that should not be visible to most people.
"Password to modify" is weaker but more flexible. The file opens normally, and anyone can read it. But if they try to edit a cell, save changes, or alter the structure, Excel asks for the password. This works well when you want people to reference the data but not accidentally (or intentionally) change it. Many teams use this for shared templates or read-only reference sheets.
You can set both passwords at the same time. If you do, someone needs the "open" password just to see the file, and then they need the "modify" password to edit it. This creates two layers of protection, though it also means you have to remember two passwords.
What happens when someone tries to open a password-protected file
If you set a "password to open", Excel shows a dialog box the moment someone tries to open the file. They cannot proceed without typing the correct password. If they get it wrong, they can try again, but there is no limit on attempts — this is a weakness of Excel's password system.
If you set only a "password to modify", the file opens normally. The person sees all the data. But the moment they click into a cell to edit it, a dialog appears asking for the password. If they do not enter it, they can still read and copy the data, but they cannot save any changes to that file.
Excel does not lock the file or prevent multiple people from opening it at once. If two people have the same password and open the file simultaneously, Excel will warn the second person that the file is already open and ask whether they want to open a read-only copy or edit anyway (which may cause conflicts).
How to change or remove a password later
To change the password, open the file (you will need to enter the current password if it has one). Then go to File > Save As > Tools (or Options) > General Options again. The password fields will be empty or show dots. Clear them and type a new password, or leave them blank to remove the password entirely. Click OK and save.
If you forget the password, Excel cannot recover it. There is no "forgot password" button and no way to reset it through Microsoft. You would need to use a third-party password recovery tool, which may or may not work depending on the version of Excel and the strength of the password. The safest approach is to store your password in a password manager like Bitwarden, 1Password, or the one built into Windows or Mac.
Why Excel passwords are not as strong as you might think
Excel passwords protect your file from casual access, but they are not military-grade encryption. Someone with technical knowledge and the right tools can crack an Excel password, especially if it is short or uses common words. Excel's encryption has also weakened over time as computing power has increased.
If your spreadsheet contains truly sensitive data — financial records, health information, or trade secrets — consider using a more robust encryption method. You could store the file in a password-protected cloud service like OneDrive or Google Drive, which adds a second layer. Or you could encrypt the entire folder using your operating system's built-in encryption (BitLocker on Windows, FileVault on Mac) before saving the Excel file inside it.
For most household and small business use, an Excel password is sufficient to prevent accidental or opportunistic access. Just do not rely on it as your only security measure if the data is highly sensitive.
Password requirements and best practices
Excel does not enforce password complexity — you can set a password as straightforward as "1" or as long as you want. However, a stronger password is harder to crack. A good password for an Excel file is at least 12 characters long, includes uppercase and lowercase letters, numbers, and symbols, and does not use dictionary words or personal information.
Examples of weak passwords: "password123", "excel2024", your name, your birthday. Examples of stronger passwords: "Tr0pic@lSunset#42", "BlueMoon$Desk&File". The longer and more random, the better.
Store your password somewhere safe. If you use the same password for multiple files, write it down in a password manager, not in a sticky note on your monitor or in an unencrypted text file on your desktop. If you share the file with others, send the password through a separate channel — never in the same email as the file itself.
Frequently Asked Questions
Can I password-protect just one sheet in a workbook instead of the whole file?
Yes. Right-click the sheet tab at the bottom of Excel, select Protect Sheet, and set a password. This prevents people from editing that specific sheet, but they can still open the file and view other unprotected sheets. This is useful when you have a workbook with multiple sheets and want to lock only the ones with sensitive data.
What if I set a password and then forget it?
Excel does not have a password recovery feature. You cannot open the file without the correct password. Some third-party tools claim to crack Excel passwords, but they work inconsistently and may not recover the file intact. The best prevention is to store your password in a password manager or write it down in a find location.
Does password-protecting an Excel file slow it down?
No. The password protection happens at save and open time, not while you are working. Once the file is open and you have entered the password, the file performs normally. There is no noticeable speed difference between a password-protected file and an unprotected one.
Can I share a password-protected Excel file with someone?
Yes. Send them the file and tell them the password through a separate method — a phone call, a different email, or a messaging app. Never send the password in the same email as the file. If you are sharing through a cloud service like OneDrive or Google Drive, you can set permissions so only certain people can access the folder, adding another layer of control.
Does Excel password protection work on Mac and Windows the same way?
Yes, the process is nearly identical. On Mac, the button is labeled Options instead of Tools, but the General Options dialog and password fields are the same. A file password-protected on Windows will work on Mac and vice versa.