Excel lets you lock a file so only someone with the password can open it or edit it

You can password protect an Excel file in two ways: require a password to open the file at all, or require a password to make changes while allowing others to view it read-only. Both methods work the same way across Windows and Mac, though the exact menu location differs slightly. The process takes less than a minute once you know where to look.

Password protection in Excel is built into the program itself — you do not need extra software or plugins. The password is encrypted when you save the file, which means Excel does not store it in plain text and cannot retrieve it if you forget it. This also means if you lose the password, there is no "forgot password" button; you will need to use a password recovery tool or recreate the file.

Key Takeaways

  • Open the file you want to protect, then use File > Info > Protect Workbook (Windows) or File > Properties (Mac) to set a password.
  • You can require a password to open the file, or require a password to edit while allowing others to view it without a password.
  • Excel passwords are case-sensitive, so "MyPassword" and "mypassword" are different — write down the exact password you use.
  • If you forget the password, Excel cannot recover it; you will need third-party recovery software or to recreate the file.
  • Password protection encrypts the file but does not hide the data inside — someone with the password can see all cells, formulas, and sheets.

How to password protect on Windows

Open the Excel file you want to protect. Click the File tab in the top left, then click Info in the left sidebar. You will see a button labeled Protect Workbook with a dropdown arrow next to it.

Click the dropdown arrow and select Encrypt with Password. A dialog box will appear asking you to enter a password. Type your password, then click OK. Excel will ask you to type the password again to confirm it. Once you click OK a second time, save the file using Ctrl+S or File > Save. The password protection takes effect when you close and reopen the file.

If you want to allow others to view the file without a password but require a password to edit it, use Protect Workbook > Protect Current Sheet or Protect Workbook Structure instead. These options let you set a password for editing while leaving the file openable without one.

How to password protect on Mac

Open the Excel file you want to protect. Click File in the menu bar at the top, then click Properties near the bottom of the menu. A dialog box will open with several tabs.

Click the Security tab. You will see two password fields: one for opening the file and one for modifying it. Enter a password in the Password to open field if you want to require a password just to view the file. Enter a password in the Password to modify field if you want to allow viewing without a password but require one to make changes. You can use both, one, or neither — it depends on your needs.

Click OK, then save the file. The next time someone opens it, they will be prompted for the password you set.

The difference between opening and editing passwords

Password to open means no one can view the file without entering the correct password. This is the strongest protection if you want the file contents completely hidden from people who do not have the password.

Password to modify (or edit) means anyone can open and view the file, but they cannot make changes without the password. This is useful when you want to share a file for reference but prevent accidental or intentional edits. Someone viewing the file in read-only mode can still copy data out of it, print it, or take screenshots.

You can set both passwords on the same file. For example, you might require one password to open it and a different password to edit it. Just remember that if someone forgets either password, you cannot retrieve it.

What password protection does and does not do

Password protection in Excel encrypts the file so it cannot be opened without the password. However, it does not hide individual cells, rows, or columns from someone who has the password — they can see everything in the workbook once they open it. If you need to hide specific data even from people with the password, you will need to use sheet protection or cell hiding features in addition to file-level password protection.

Password protection also does not prevent someone from copying data out of the file, printing it, or taking screenshots. It only prevents them from opening the file without the password or editing it without the password, depending on which type you chose.

If you are protecting a file that contains sensitive information like financial data or personal details, password protection is a good first step. For highly sensitive files, consider storing them in a password-protected folder or using cloud storage with additional access controls.

Removing or changing a password

To remove a password from an Excel file, open the file and enter the password when prompted. Then follow the same steps you used to set the password: on Windows, go to File > Info > Protect Workbook > Encrypt with Password, or on Mac, go to File > Properties > Security. Leave the password field blank and click OK. Save the file, and the password protection will be removed.

To change a password, open the file with the current password, then follow the same steps and enter a new password instead of leaving it blank. Make sure you save the file after making the change.

What to do if you forget the password

Excel does not have a built-in password recovery feature. If you forget the password to open a file, you cannot access it without either remembering the password or using a third-party password recovery tool. These tools work by attempting to crack the password, which can take anywhere from minutes to hours depending on the password strength.

If you forget a password to modify a file (but not to open it), you can open the file in read-only mode and save a copy of it without the password protection, though you will lose any edits made since the last save.

The best approach is to store your passwords in a password manager like Bitwarden, 1Password, or KeePass so you do not have to remember them. Write down the password on paper and store it somewhere secure if you prefer not to use a password manager.

Frequently Asked Questions

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

Yes. On Windows, go to File > Info > Protect Workbook > Protect Current Sheet. On Mac, go to Tools > Protect Sheet. This lets you lock one sheet while leaving others editable. However, someone can still see the sheet name and potentially unhide it if they know how.

Is Excel password protection secure enough for confidential business data?

Excel passwords provide basic protection against casual access, but they are not military-grade encryption. For highly confidential data, consider using file-level encryption through your operating system or cloud storage provider in addition to Excel's password feature.

What happens if I password protect a file and then share it with someone?

They will be prompted to enter the password when they try to open it. Make sure you share the password through a separate, secure channel — never in the same email or message as the file itself.

Can I use special characters or spaces in an Excel password?

Yes, Excel accepts special characters, spaces, and numbers in passwords. Longer passwords with a mix of uppercase, lowercase, numbers, and symbols are harder to crack than simple ones.

Does password protecting an Excel file slow it down or change how it works?

No. Password protection does not affect file size, performance, or functionality. The file works exactly the same way once it is open — the password only controls access to opening or editing it.