Password protection and encryption are the two main ways to secure an Excel file

You can password-protect an Excel file so that only someone who knows the password can open it, or you can allow people to open it but require a password to edit it. You can also encrypt the file so that its contents are scrambled and unreadable without the correct password. Most people use password protection, which takes about 30 seconds to set up. Encryption is stronger but slightly more complex.

The method you choose depends on what you want to prevent. If you want to stop someone from opening the file at all, use password protection with an opening password. If you want people to be able to read it but not change it, use an editing password instead. If you're storing sensitive data and want military-grade protection, use encryption.

Key Takeaways

  • Password protection in Excel lets you set a password to open the file, a password to edit it, or both.
  • You can password-protect a file in under a minute through the File menu without any additional software.
  • Encryption scrambles the file contents so that even if someone copies the file, they cannot read it without the password.
  • A password to edit is weaker than a password to open — someone can copy the file and remove the edit restriction in some cases.
  • Windows and Mac have slightly different steps, and older Excel versions may not support all encryption options.

How to add a password to open your Excel file

Open the file you want to protect in Excel. Click File in the top left, then click Info. Look for a button or option that says Protect Workbook or Protect Sheet — the exact wording depends on your Excel version. Click it and select Encrypt with Password.

A dialog box will appear asking you to enter a password. Type your password and click OK. Excel will ask you to type the password again to confirm it. Once you confirm, save the file. The next time anyone tries to open it, Excel will prompt them for the password before the file opens.

Make your password at least 8 characters long and include uppercase letters, lowercase letters, numbers, and symbols if possible. Write it down somewhere safe — if you forget it, you cannot recover the file. Excel does not have a "forgot password" option.

How to add a password to edit your Excel file

This option lets people open and read the file without a password, but they need a password to make changes. Open the file, click File, then Info. Click Protect Workbook and select Encrypt with Password. This time, leave the opening password blank and enter only an editing password.

When someone opens the file, they will see it immediately. If they try to edit a cell, Excel will ask for the password. They can still copy the data and paste it into a new file, so this method is not secure against determined users — it is mainly useful for preventing accidental changes by colleagues.

How to encrypt an Excel file on Windows

Encryption is stronger than password protection because it scrambles the entire file. Even if someone steals the file from your computer or email, they cannot read it without the password. On Windows, open the file in Excel, click File, then Info. Click Protect Workbook and select Encrypt with Password.

Enter your password and click OK. Confirm the password when prompted. Save the file. The file is now encrypted — Excel will decrypt it automatically when you open it with the correct password.

If you want to encrypt a file without opening it in Excel first, you can also right-click the file in Windows File Explorer, select Properties, click Advanced, and check the box that says Encrypt contents to secure data. This uses Windows encryption rather than Excel encryption, but it works just as well.

How to encrypt an Excel file on Mac

On Mac, open the file in Excel, click File in the menu bar, then click Properties or Info depending on your Excel version. Look for Security or Protect Workbook. Click Encrypt with Password, enter your password, and click OK. Confirm the password and save the file.

If you have an older version of Excel for Mac, the menu options may be slightly different. Click Tools instead of File, then look for Protect Sheet or Protect Workbook. The password entry process is the same.

The difference between protecting a sheet and protecting a workbook

When you protect a sheet, you lock individual cells or ranges so that people cannot edit them, but they can still see the data. When you protect a workbook, you add a password to the entire file. Most people want to protect the workbook, not the sheet.

Sheet protection is useful if you want to let people edit certain cells but not others — for example, a template where only specific fields should be filled in. Workbook protection is what you need if you want to keep the entire file private or prevent unauthorized changes to the whole document.

What to do if you forget your password

If you forget the password to a protected Excel file, there is no built-in recovery method. Microsoft does not have a way to reset or recover lost passwords. You cannot open or edit the file without the correct password.

Some third-party tools claim to crack Excel passwords, but they work only on older Excel files (before 2007) or files with weak passwords. For modern Excel files with strong passwords, these tools are not reliable. Your best option is to keep a written record of your password in a secure location, such as a password manager.

Frequently Asked Questions

Can someone remove the password from my Excel file?

If you used a password to edit (not to open), someone can copy the file and remove the edit protection using built-in Excel features or third-party tools. If you used a password to open or encrypted the file, they cannot remove the password without knowing it. Encryption is much harder to bypass than edit protection.

Does password protection work on Excel files shared in OneDrive or SharePoint?

Yes. Password protection and encryption work the same way whether the file is on your computer or in the cloud. When you upload a password-protected file to OneDrive or SharePoint, the password stays with the file. Anyone who downloads it will need the password to open it.

Can I password-protect just one sheet in a workbook?

Yes. Click the sheet tab at the bottom of Excel, right-click it, and select Protect Sheet. Enter a password and click OK. That sheet is now protected while other sheets in the same workbook remain unprotected. People can still see the sheet tabs and navigate to other sheets.

What is the strongest password for an Excel file?

Use at least 12 characters with a mix of uppercase letters, lowercase letters, numbers, and symbols. Avoid dictionary words or personal information like birthdays or names. A password like "Tr0pic@lSunset#42" is much stronger than "password123" or "Excel2024".

Does encrypting an Excel file slow it down?

No. Encryption happens when you save and when you open the file, but the slowdown is barely noticeable on modern computers. Once the file is open, it runs at normal speed. You will not see any performance difference while working in the file.