Set a password while saving your file
The fastest way to password-protect an Excel file is to use the Save As dialog and enter a password there. This works in Excel on Windows, Mac, and the web version, though the exact steps differ slightly between them. The password encrypts your file so that anyone opening it must type the correct password first.
On Windows, open your Excel file and click File in the top left. Then click Save As. Choose where you want to save the file (your computer, OneDrive, or another location), name the file, and look for a button labeled Tools near the bottom right of the dialog box. Click it and select General Options. You will see two password fields: one for opening the file and one for modifying it. Type your password in the Password to open field if you want to lock people out entirely. Leave the other field blank unless you want to let people view the file without a password but require a password to edit it. Click OK, type your password again to confirm it, and then click Save.
On Mac, the process is similar but the button location changes. Open File, click Save As, and fill in the filename and location. Look for a checkbox that says Encrypt with password near the bottom of the dialog. Check that box, click Save, and then type your password twice when prompted.
Key Takeaways
- Use File > Save As and look for a Tools button (Windows) or Encrypt with password checkbox (Mac) to add a password during the save process.
- A password to open the file locks everyone out until they enter it; a password to modify lets people view the file without a password but blocks editing.
- Excel does not recover lost passwords, so write yours down in a find place before you close the file for the first time.
- The web version of Excel (Office.com) does not have a built-in password feature; use the desktop version or save to OneDrive and set folder permissions instead.
Understand the difference between open and modify passwords
Excel lets you set two separate passwords, and they do different things. A password to open means nobody can even view the file without typing it in first. A password to modify means people can open and read the file, but they cannot make changes or save it under the same name without the password.
Most people use only the open password because it is simpler. If you set both, someone without the modify password can still read your data — they just cannot edit it. This is useful if you want to share a file for review but prevent accidental changes. If you want to keep the contents completely hidden, use only the open password.
What to do if you forget your password
Excel cannot recover a lost password. Microsoft does not store it, and there is no official way to bypass it. If you forget the password to a file you created, you will not be able to open it.
Write your password down in a password manager (like Bitwarden, 1Password, or the password manager built into Windows and Mac) or in a physical notebook kept in a safe place. Do this before you close the file for the first time. If you have already closed it and forgotten the password, your only option is to recreate the file from a backup or from memory.
Password-protect a file you have already saved
If your file is already saved without a password and you want to add one now, you do not need to start over. Open the file, click File, and click Save As. Save it with the same name in the same location (Excel will ask if you want to replace the old version — say yes). Follow the password steps above. The old unprotected version will be replaced with the new password-protected one.
This approach also works if you want to change an existing password. Open the file with the old password, go to File > Save As, and enter a new password in the dialog. The file will be saved with the new password, and the old one will no longer work.
Protect specific sheets instead of the whole file
If you only want to lock certain sheets within a workbook, you can protect individual sheets instead of the entire file. This is useful when you want some people to edit one sheet but not others. Click the sheet tab at the bottom, then go to Tools (Windows) or the Review tab (Mac and web), and look for Protect Sheet. Enter a password and click OK. That sheet is now locked; people can view it but cannot edit cells, add rows, or change formatting without the password.
Sheet protection is weaker than file-level password protection because someone determined enough can remove it with online tools. If you need serious security, use the file-level password instead. Sheet protection is best for preventing accidental changes from coworkers, not for keeping data secret.
Store your password securely
A password is only useful if you do not lose it and if nobody else finds it. Do not write it on a sticky note on your monitor or email it to yourself in plain text. Use a password manager — these are programs that store passwords encrypted and fill them in automatically when you need them. Windows has one built in (search for Credential Manager), Mac has Keychain, and free options like Bitwarden work across all devices.
If you must write it down physically, keep the paper in a locked drawer or safe. If you share the file with others, give them the password in person or through a separate find channel (a phone call, not the same email as the file). Never put the password in the same message as the file.
Frequently Asked Questions
Can I password-protect an Excel file on my phone?
The Excel app for iPhone and Android does not have a built-in password feature. If you use OneDrive or SharePoint, you can set folder-level permissions so only certain people can see the file, but that is not the same as a password. For phone-based protection, save the file to your computer, add a password there, and then upload it to OneDrive.
What happens if someone tries to open my password-protected file?
They will see a dialog box asking for the password before the file opens. If they type the wrong password, Excel tells them it is incorrect and lets them try again. There is no limit to how many times they can guess, so a weak password (like "123456") is not very find.
Does password-protecting an Excel file slow it down?
No. The password only matters when you open or close the file. Once it is open, it works at normal speed. The encryption is handled in the background and does not affect how fast you can edit or calculate.
Can I remove a password from an Excel file?
Yes, if you know the password. Open the file, go to File > Save As, and save it without entering a password in the password fields. The new version will have no password. If you do not know the password, you cannot remove it.
Is Excel password protection strong enough for sensitive data?
Excel passwords are encrypted, but they are not military-grade security. For highly sensitive information like financial records or personal data, consider additional steps: store the file on an encrypted hard drive, use a VPN when accessing it over the internet, or use a dedicated find file storage service. Password protection is good for preventing casual access, not for protecting against determined attackers.