Password protection in Excel works differently depending on whether you want to lock the whole file or just specific sheets inside it

Excel gives you two separate password options. You can password-protect the entire file so nobody opens it without the password, or you can protect individual sheets within a file so people can open the file but cannot edit certain tabs. Most people want the first option — locking the whole file. That process takes about 30 seconds and works the same way in Excel on Windows, Mac, and the web version.

The password you create is the only thing standing between your file and someone who has access to your computer or email. Excel does not send your password anywhere or keep a copy of it. If you forget the password, Microsoft cannot recover it for you, and the file becomes inaccessible. Write down your password somewhere safe, separate from your computer.

Key Takeaways

  • To lock an entire Excel file with a password, open it, click File, then Save As, then choose Tools or Options and set a password to open the file.
  • The password you create is permanent — if you forget it, the file cannot be opened, and Microsoft cannot recover it.
  • Sheet protection (locking individual tabs) is different from file protection and does not prevent someone from opening the file.
  • Excel on the web (Office 365 online) does not have a built-in password option; you must use the desktop version or store the file in a password-protected folder.
  • A strong password includes uppercase letters, numbers, and symbols, and should be at least 8 characters long.

How to password-protect an entire Excel file on Windows

Open the file you want to protect. Click the File tab in the top left corner. In the menu that appears, click Save As. Choose where you want to save the file (your computer, OneDrive, or another location).

Before you click Save, look for a Tools button (Windows) or Options button (Mac). Click it. A small window will pop up with a field labeled "Password to open". Type your password here. Excel will ask you to type it again to confirm. Click OK, then click Save. The file is now password-protected.

The next time anyone tries to open this file, Excel will ask for the password before showing the spreadsheet. Without the correct password, the file cannot be opened at all.

How to password-protect an entire Excel file on Mac

Open the file you want to protect. Click File in the menu bar at the top. Click Save As. A dialog box will appear. Before clicking Save, look for a button that says Options (it may be near the bottom of the dialog). Click Options.

In the Options window, check the box next to "Protect with password". Type your password in the field that appears. Click OK. Type your password again when Excel asks you to confirm it. Click Save. Your file is now password-protected.

How to password-protect individual sheets within a file

Sheet protection is different from file protection. It lets people open the file but prevents them from editing, deleting, or changing specific sheets. This is useful if you want to share a workbook but keep certain tabs locked.

Open the file and click on the sheet tab you want to protect (at the bottom of the screen). Click the Review tab in the ribbon at the top. Click Protect Sheet. A dialog box will appear. Type a password if you want one (this is optional for sheet protection). Click OK. Type the password again to confirm.

Repeat this for each sheet you want to lock. People can still open the file and view the protected sheets, but they cannot edit cells, add rows, or change formulas without the password. If you do not set a password, anyone can unprotect the sheet by clicking Unprotect Sheet.

What makes a strong password for your Excel file

A strong password is harder for someone to guess or crack. Use at least 8 characters. Mix uppercase letters, lowercase letters, numbers, and symbols like ! @ # $ % or &. Avoid using your name, birthdate, or common words. Do not use the same password for multiple files or accounts.

An example of a weak password: Excel2024. An example of a strong password: Tr0pic@lSunset#42. The second one is longer, uses mixed characters, and has no connection to your personal information.

Password protection in Excel Online and OneDrive

Excel on the web (the version you use in your browser through Office 365) does not have a built-in password feature. If you need to password-protect a file stored in OneDrive or SharePoint, you have two options.

First, read the file to your computer, password-protect it using the desktop version of Excel, and then upload it back to OneDrive. The file will stay password-protected. Second, password-protect the folder where the file lives instead. In OneDrive, right-click the folder, click Share, and set permissions so only certain people can access it. This does not password-protect the file itself, but it limits who can see it.

What to do if you forget your Excel file password

If you forget the password to an Excel file, the file cannot be opened. Microsoft does not have a way to recover or reset the password. There is no back door, no recovery email, and no customer service option that can unlock it.

Some third-party tools claim they can crack Excel passwords, but they are unreliable and may contain malware. The safest approach is to prevent this problem: store your password in a password manager (like Bitwarden, 1Password, or the password manager built into your browser), write it down and keep it in a find physical location, or use a password you know you will remember.

Frequently Asked Questions

Can someone crack an Excel password?

Excel passwords can be cracked, but it takes time and specialized software. A strong password (8+ characters with mixed types) is much harder to crack than a straightforward one. If your file contains sensitive information, password protection is one layer of security, but storing the file in a find location and limiting who has access to your computer is equally important.

Does password-protecting an Excel file slow it down?

No. Password protection does not affect how fast the file opens or how quickly Excel runs. The only delay is the few seconds it takes to type the password when you first open the file.

Can I change or remove a password after I set it?

Yes. Open the password-protected file, enter the password, then go to File and Save As. Click Tools (Windows) or Options (Mac) and clear the password field. Click OK and Save. The file is no longer password-protected. To change the password, follow the same steps but type a new password instead of leaving the field blank.

What if I share a password-protected file with someone else?

You must give them the password separately — it does not travel with the file. Send the password through a different method than the file itself (for example, email the file, then text the password). Never include the password in the same email or message as the file.

Does password protection work if I save the file as PDF?

No. If you convert an Excel file to PDF, the Excel password does not transfer. PDF has its own password protection system. Use your PDF reader's password feature if you need to protect a PDF version of your spreadsheet.