Password protection locks your Excel file so only someone who knows the password can open it

Excel has a built-in password feature that encrypts your file. When you set a password, anyone who tries to open the file will see a prompt asking for the password before they can view or edit anything inside. This works on both Windows and Mac versions of Excel, and the password stays with the file no matter where you move it or who you send it to.

The process takes less than a minute. You do not need any special software or add-ons — the feature is already in Excel. The password you create is the only way to unlock the file, so write it down somewhere safe if you think you might forget it. Excel cannot recover a lost password.

Key Takeaways

  • Open your Excel file, go to File menu, then select Save As and choose a location to save.
  • Click the Tools button (Windows) or Options button (Mac) in the Save As dialog, then select General Options.
  • Type your password in the "Password to open" field, then type it again to confirm it matches.
  • Save the file — from now on, anyone opening it will need to enter the password first.
  • If you forget the password, there is no way to recover it, so keep it written down in a secure place.

Password-protecting on Windows

Start by opening the Excel file you want to protect. Click the File menu in the top left corner, then select Save As from the list. Choose where you want to save the file — you can keep it in the same folder or pick a new one.

In the Save As dialog box, look for a button labeled Tools near the bottom right. Click it and select General Options from the dropdown menu. A small dialog box will appear with two password fields: "Password to open" and "Password to modify." You only need to fill in the first one to lock the file completely. Type your password in the "Password to open" field — use something you will remember but that is not obvious to others, like a combination of numbers and letters.

Type the same password again in the confirmation field below it. Excel will ask you to re-enter it to make sure you did not make a typo. Click OK, then click Save. Your file is now password-protected. The next time anyone opens it, they will see a password prompt before the spreadsheet appears.

Password-protecting on Mac

Open your Excel file and click File in the menu bar at the top. Select Save As, just like on Windows. Choose a location for the file and give it a name if you want to change it.

Look for a button labeled Options near the bottom of the Save As dialog. Click it to open the options panel. You will see a checkbox that says "Protect with password" — click that box to turn it on. A password field will appear below it. Type your password and click OK. Excel will ask you to type it one more time to confirm.

Click Save to finish. Your file is now locked. Anyone who tries to open it will need to type the password first.

Choosing a password that actually protects your file

A strong password is harder for someone to guess or crack. Avoid using your name, birthdate, or common words. Instead, mix uppercase letters, lowercase letters, and numbers together — something like "Blue7Desk42" works better than "password" or "123456."

The longer your password, the harder it is to break. A password with 8 or more characters is much safer than a short one. Do not use the same password for your Excel file that you use for email, banking, or other important accounts. If someone gets your Excel password, you do not want them to have access to everything else.

Write your password down and store it somewhere secure — a locked drawer, a safe, or a password manager you trust. Do not email it to yourself or leave it in a sticky note on your monitor. If you forget it, there is no recovery option. Excel cannot unlock the file for you, and no support team can retrieve a lost password.

What happens when someone tries to open your protected file

When a person tries to open your password-protected Excel file, they will see a dialog box asking for the password. They have three chances to type it correctly. If they get it wrong three times, Excel will not let them try again — they have to close the file and start over.

If they type the correct password, the file opens normally and they can view and edit it just like you can. The password only controls who can open the file, not what they can do once it is open. If you want to prevent people from editing the file after they open it, that is a separate feature called sheet protection, which is different from file password protection.

Removing or changing the password later

If you want to take the password off your file, open it and type the password when prompted. Then go to File, select Save As, and click Tools (Windows) or Options (Mac). In the General Options dialog, leave the password fields blank and click OK. Save the file. The password is now removed.

To change your password to something new, follow the same steps but type your new password in the fields instead of leaving them blank. This is useful if you think someone might have learned your old password or if you just want to use something easier to remember.

Common mistakes that leave your file unprotected

The most common mistake is using Save instead of Save As. The regular Save button does not open the password dialog — you must use Save As to set up password protection. If you have already saved your file and want to add a password, you still need to go through Save As.

Another mistake is confusing file password protection with sheet protection. Sheet protection prevents people from editing specific cells or sheets, but it does not stop them from opening the file. If you want to truly lock people out, you need the file-level password, not sheet-level protection.

Some people also forget to actually save the file after setting the password. If you type the password in the dialog but then close the Save As window without clicking Save, the password will not be applied. Always click Save at the end of the process.

Frequently Asked Questions

Can I password-protect an Excel file that is already saved?

Yes. Open the file, go to File, and select Save As. Choose the same location and filename, then add the password through Tools (Windows) or Options (Mac). When you click Save, Excel will ask if you want to replace the existing file — click Yes. The file is now password-protected.

What if I forgot my Excel file password?

Unfortunately, there is no built-in recovery method. Excel does not store passwords in a way that can be retrieved. If you have a backup copy of the file without a password, use that instead. Otherwise, you will need to recreate the file from scratch or contact the person who created it to ask for the password.

Does password protection work if I email the file to someone?

Yes. The password stays attached to the file no matter how it is sent or stored. When the person receives it and tries to open it, they will see the password prompt. The file is protected until someone enters the correct password.

Can I password-protect just one sheet instead of the whole file?

That is sheet protection, which is different from file protection. Sheet protection prevents editing but does not stop someone from opening the file. If you want to completely lock people out, use file-level password protection as described in this guide.

Is Excel password protection secure enough for sensitive information?

Excel passwords work well for keeping casual users out and preventing accidental changes. For highly sensitive data like financial records or personal information, consider additional security measures like storing the file on an encrypted drive or using a dedicated secure file storage service.