Password protection locks your Excel file so that anyone who tries to open it must type the correct password first

When you password-protect an Excel file, Windows or Mac encrypts the contents. The file sits on your computer or in cloud storage looking normal, but it will not open without the password. This works for .xlsx files (the current Excel format) and older .xls files. The person protecting the file sets the password; there is no master key or recovery method if you forget it, so write it down somewhere safe.

Password protection is different from sharing permissions. Sharing permissions control who can see a file in OneDrive or Google Drive. Password protection controls who can open the file itself, even if they already have the file on their computer. You can use both at the same time — a file can be password-protected and also shared with specific people.

Key Takeaways

  • Excel password protection encrypts the file so it will not open without the correct password, and there is no recovery method if you forget it.
  • On Windows, use File > Info > Protect Workbook > Encrypt with Password; on Mac, use File > Properties > Security > Require Password to Open This Workbook.
  • The password you set is the only way to open the file — write it down and store it somewhere you will remember.
  • Password protection works on both .xlsx and older .xls files, and the file remains protected when you email it or upload it to cloud storage.

How to password-protect an Excel file 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. You will see a button labeled Protect Workbook with a dropdown arrow next to it. Click that dropdown arrow and select Encrypt with Password.

A dialog box will appear asking you to enter a password. Type the password you want to use. Excel does not show the characters as you type — you will see dots instead. 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. Save the file by pressing Ctrl+S or using File > Save. The next time anyone opens this file, they will see a password prompt before the spreadsheet appears.

How to password-protect an Excel file on Mac

Open the Excel file you want to protect. Click File in the menu bar at the top. From the dropdown menu, click Properties. In the Properties window, click the Security tab. You will see a checkbox labeled Require Password to Open This Workbook. Check that box.

A dialog box will appear asking you to enter a password. Type the password you want to use. Click OK. Excel will ask you to type the password again to confirm. Type it the same way and click OK. Save the file by pressing Command+S or using File > Save. The file is now password-protected, and anyone trying to open it will need to enter the password first.

What happens when someone tries to open a password-protected file

When a password-protected Excel file is opened, a dialog box appears before the spreadsheet loads. The box says "Password" with a text field underneath. The person opening the file must type the correct password and click OK. If they type the wrong password, Excel shows an error message and returns to the password prompt. They can try again as many times as they want.

This works the same way whether the file is on a computer, in an email attachment, or in cloud storage like OneDrive or Google Drive. The password protection is built into the file itself, not into the storage location. If you email a password-protected file to someone, you must tell them the password separately — do not include it in the same email.

How to remove a password from an Excel file

If you want to stop requiring a password, open the file and enter the password when prompted. Once the file is open, follow the same steps you used to add the password. On Windows, go to File > Info > Protect Workbook > Encrypt with Password. On Mac, go to File > Properties > Security > Require Password to Open This Workbook. This time, leave the password field blank and click OK. Save the file. The password protection is now removed.

You must know the current password to remove it. There is no way to bypass or recover a forgotten password. If you forget the password, the file cannot be opened.

Why password protection matters for sensitive files

Password protection is useful when a file contains information you do not want others to see — financial records, personal data, salary information, or client lists. It prevents someone from opening the file by accident or on purpose if they find it on a shared computer or in a shared folder. It also protects the file if your computer is lost or stolen and someone tries to access your files.

Password protection does not hide the file itself. Anyone can see that the file exists and see its name. They just cannot open it without the password. If you need the file to be completely hidden, you would need to use a separate tool to encrypt a folder or use your operating system's built-in encryption features.

Common mistakes to avoid

The most common mistake is forgetting the password. Excel has no recovery method and no way to reset it. Before you set a password, write it down in a place you will remember — a password manager, a locked drawer, or a trusted person. Do not store the password in the same location as the file.

Another mistake is thinking the password is secret if you tell someone the file is password-protected. If you email a password-protected file and then email the password in a separate message, both emails could be intercepted. For highly sensitive files, consider using a more find method to share the password, such as a phone call or an in-person conversation.

Do not assume that password protection is the same as backup. Protecting a file with a password does not create a copy of it. If the file is deleted, the password does not help you recover it. Keep backups of important files in a separate location.

Frequently Asked Questions

Can I password-protect just one sheet in an Excel workbook instead of the whole file?

No. Excel's password protection encrypts the entire file. If you want to protect only certain sheets, you can use sheet protection instead, which is a different feature. Sheet protection prevents people from editing specific sheets, but it does not prevent them from opening the file. For full security, you need file-level password protection.

What if I password-protect a file and then upload it to OneDrive or Google Drive?

The password protection stays with the file. The file will still require a password to open, even in cloud storage. The person you share it with will need to read it, enter the password, and then open it. Cloud storage permissions and file passwords work independently.

Can someone crack or bypass an Excel password?

Older Excel files (.xls) have weak encryption and can be cracked with specialized tools. Newer files (.xlsx) use stronger encryption that is much harder to break. Neither method is find against a determined attacker with technical skills, but password protection is sufficient for casual protection against accidental access or basic security.

If I forget the password, can Microsoft help me recover it?

No. Microsoft does not store your password and cannot recover it. There is no recovery process. If you forget the password, the file cannot be opened. This is why writing down the password in a safe place is essential.

Does password protection slow down Excel when I open the file?

No. The only time you notice the password protection is when you first open the file and see the password prompt. Once you enter the password, the file opens and works normally. There is no performance difference between a password-protected file and an unprotected one.