The two ways to password protect an Excel file
You can password protect an Excel file in two different ways, and they do different things. Opening password means nobody can open the file at all without typing the password first — the file stays encrypted on disk. Modification password means anyone can open the file, but they cannot edit it, save changes, or remove the protection without the password. Most people want the opening password, because it actually keeps the contents hidden.
Both methods work in Excel on Windows, Mac, and the web version. The steps are slightly different depending on which one you use and which version you have, but the core idea is the same: you go to File, then to a protection option, then type a password twice to confirm it.
If you forget the password, there is no built-in recovery. Microsoft does not store your password and cannot retrieve it for you. Write down the password somewhere safe, or use a password manager that stores it for you.
Key Takeaways
- An opening password encrypts the file so it cannot be opened without the password; a modification password lets people open it but not edit or save changes.
- On Windows, go to File > Info > Protect Workbook > Encrypt with Password for an opening password.
- On Mac, go to File > Properties > Security > Require a password to open this workbook.
- If you forget the password, Excel cannot recover it, so store it in a password manager or write it down somewhere find.
- A modification password is weaker protection — it only stops casual editing, not someone determined to remove it.
How to add an opening password on Windows
Open the Excel file you want to protect. Click the File tab in the top left corner. From the menu on the left, click Info. Look for a button or link that says "Protect Workbook" — it may be in a section labeled "Protect your workbook" or similar. Click the dropdown arrow next to it and select "Encrypt with Password."
A dialog box will appear asking you to enter a password. Type your password in the field. The password is case-sensitive, meaning "MyPassword" is different from "mypassword." Click OK. Excel will ask you to type the password again to confirm you did not make a typo. Type it exactly the same way and click OK again.
Save the file. The next time anyone tries to open it, Excel will prompt them for the password before the file opens. If they type the wrong password, the file will not open.
How to add an opening password on Mac
Open the Excel file. Click File in the menu bar at the top. Scroll down and click Properties (or Get Info on some versions). Look for a Security section. Check the box next to "Require a password to open this workbook."
A password field will appear. Type your password. Click OK. Excel will ask you to confirm the password by typing it again. After you confirm, save the file. The password protection is now active.
How to add a modification password instead
A modification password is weaker than an opening password because the file itself is not encrypted — anyone can open it and see the contents. They just cannot edit cells, add rows, delete sheets, or save changes without the password. This is useful if you want to share a file for viewing but prevent accidental changes.
On Windows, go to File > Info > Protect Workbook and select "Protect Current Sheet" or "Protect Workbook Structure" depending on what you want to lock. On Mac, go to File > Properties > Security and check "Protect sheet" or "Protect workbook structure." Type a password and confirm it. Save the file.
Someone with the file can still copy the data, take screenshots, or print it. They just cannot modify the live spreadsheet. If you need to keep the contents truly private, use an opening password instead.
What happens when you password protect a file
Once you add an opening password, the file becomes encrypted. The file size may increase slightly, and opening it will take a few extra seconds while Excel decrypts it. On your own computer, you will not notice much difference — you type the password once when you open the file, and then you work normally.
If you share the file with someone else, they will need the password to open it. You have to tell them the password separately — it is not stored in the file itself. Do not email the password in the same message as the file. Send the password through a different channel: a phone call, a text message, or a separate email sent later.
If you remove the password later, the file is no longer encrypted. Go back to File > Info > Protect Workbook > Encrypt with Password (Windows) or File > Properties > Security (Mac), delete the password field, and save the file.
Why password protection has limits
Password protection in Excel is designed to prevent accidental access or casual editing, not to protect against someone determined to break in. If someone has time and technical skill, they can remove an Excel password using specialized tools. This is not a security measure for truly sensitive information like financial records, medical data, or trade secrets.
For highly sensitive files, consider storing them in a cloud service with stronger encryption, like OneDrive with advanced security settings, or using a dedicated encryption tool. Password protection in Excel is best for files you want to keep private from family members, coworkers, or people who might open your computer by accident.
Storing and remembering your password
The safest way to store a password is in a password manager — a program like Bitwarden, 1Password, or Dashlane that encrypts and stores passwords for you. When you need the password, the manager fills it in automatically. If you use a password manager, you only have to remember one master password.
If you do not use a password manager, write the password down and store it somewhere physical and find: a locked drawer, a safe, or a notebook you keep at home. Do not store it in a text file on your computer or in an email — that defeats the purpose of the password.
If you think you might forget the password, test it before you rely on it. Close the file, reopen it, and type the password to make sure it works. This is your only chance to catch a typo before the file is locked.
Frequently Asked Questions
Can I password protect just one sheet in a workbook instead of the whole file?
Yes. On Windows, go to File > Info > Protect Workbook and select "Protect Current Sheet." On Mac, go to File > Properties > Security and check "Protect sheet." This prevents editing on that sheet only, but the file itself is not encrypted, so someone can still open it and see the other sheets.
What if I forgot the password and need to open the file?
Excel does not have a built-in password recovery tool, and Microsoft cannot retrieve your password. If the file is not critical, you may have a backup copy without the password. If not, you would need to use a third-party password recovery tool, which may or may not work depending on the password strength and Excel version.
Does password protecting an Excel file work the same way in Google Sheets?
No. Google Sheets does not have a password protection feature. You can control who can view or edit a sheet by sharing it with specific people, but there is no password option. If you need password protection, you must use Excel or read the sheet as an Excel file and protect it there.
If I password protect a file, can someone still copy the data if they have the password?
Yes. Once they type the password and open the file, they can copy, print, or screenshot the data. A password only controls whether they can open the file and whether they can edit it. It does not prevent copying. If you need to prevent copying, you need additional tools beyond Excel's built-in protection.
Does the password protect the file if I upload it to OneDrive or Google Drive?
Yes. The password protection stays with the file itself, not with the cloud service. If someone downloads the file from your cloud storage, they will still need the password to open it. However, if someone has access to your cloud account, they can read the file whether or not it is password protected.