Password protection in Excel locks your spreadsheet so only someone with the password can open it or edit it

Excel offers two types of password protection. The first requires a password to open the file at all — anyone without it cannot see the contents. The second lets people open the file but requires a password to make changes, so you can share a read-only version. Both work on Windows and Mac, though the steps differ slightly.

Password protection is built into Excel itself, not a separate tool. The process takes under a minute once you know where to look. The password you set is the only way to unlock the file, so write it down somewhere safe — Excel cannot recover a lost password.

Key Takeaways

  • Excel has two password options: one to open the file, and one to allow viewing but block editing.
  • On Windows, go to File > Info > Protect Workbook and choose either "Encrypt with Password" or "Protect Current Sheet".
  • On Mac, use File > Properties on older versions or File > Info > Protect Workbook on newer versions.
  • Once you set a password, you must enter it every time you open the file — there is no way to recover a forgotten password.
  • Protecting a sheet is different from protecting a file; sheet protection only blocks edits to that one sheet, not access to the whole workbook.

Password protecting the entire file on Windows

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

Click the dropdown and choose 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 it again to confirm. Once you click OK a second time, the file is encrypted. The next time anyone opens this file, they will be prompted for the password before they can see any contents.

If you want people to be able to open and view the file but not change it, choose Protect Current Sheet instead. This lets you set a password that blocks edits while keeping the file readable. You can also protect multiple sheets individually by selecting each one and repeating the process.

Password protecting the entire file on Mac

Open the file in Excel. Click File in the menu bar at the top, then look for Properties (on older versions) or Info (on newer versions). If you see Properties, click it and find the Security tab. If you see Info, look for Protect Workbook.

Click Encrypt with Password or the equivalent option in your version. A password dialog will appear. Enter your password, click OK, then type it again to confirm. The file is now password-protected. Save the file to apply the protection.

Mac versions of Excel vary more than Windows versions, so the exact menu path may differ. If you cannot find these options, check the Excel menu bar for Tools — some older Mac versions put password options there instead.

The difference between file protection and sheet protection

File protection (encrypt with password) locks the entire workbook. No one can open it without the password. Sheet protection locks only one sheet within the file. Someone can still open the workbook and see other sheets, but they cannot edit the protected sheet without the password.

Use file protection when the entire spreadsheet is sensitive. Use sheet protection when you want to share a workbook but lock down specific sheets — for example, a budget template where people can edit one sheet but not the formulas on another.

You can use both at once: password-protect the file to control who opens it, and password-protect individual sheets to control what they can edit. The passwords can be different.

What happens when you forget the password

Excel does not have a password recovery feature. If you forget the password to an encrypted file, you cannot open it. There is no backdoor, no recovery code, and no way for Microsoft to unlock it for you. The file is permanently inaccessible.

Write down your password and store it somewhere secure — a password manager, a locked drawer, or a trusted person who knows where to find it. If you are protecting a file for security reasons, this is the trade-off: strong protection means no recovery option.

Removing or changing a password

To remove password protection, open the file (you will need to enter the current password). Go to File > Info > Protect Workbook and click Encrypt with Password again. This time, leave the password field blank and click OK. The protection is removed.

To change the password, follow the same steps but enter a new password instead of leaving it blank. You must know the current password to make either change.

Password protection does not encrypt the file itself

When you use Encrypt with Password in Excel, the file contents are scrambled so they cannot be read without the password. This is different from just setting a password to open — the data itself is encrypted.

Sheet protection, by contrast, is weaker. It prevents accidental or casual edits but is not true encryption. Someone with technical knowledge could potentially work around sheet protection. If you need serious security, use file-level encryption (Encrypt with Password) rather than sheet protection alone.

Frequently Asked Questions

Can I password protect an Excel file on my phone or tablet?

Excel on mobile devices (iOS and Android) does not have a built-in password protection feature. You can open password-protected files if you know the password, but you cannot set protection from the mobile app. Use a computer to set up password protection, then you can open the protected file on your phone.

What if I share a password-protected file with someone and they change the password?

Once someone opens a password-protected file, they can remove the protection if they know the password. There is no way to prevent this. If you need to control who can modify protection settings, use file-level encryption and keep the password to yourself, or use a different tool like OneDrive's sharing permissions to control access at the account level.

Does password protecting a file slow it down or make it harder to use?

No. Once the file is open, it works exactly the same way. You only enter the password when opening the file. There is no performance difference between a protected and unprotected file while you are working in it.

Can I password protect a file that is already shared in OneDrive or SharePoint?

Yes. Password protection is a property of the file itself, not the sharing settings. You can password protect a file and then share it, but anyone you share it with will need the password to open it. This is separate from OneDrive or SharePoint permissions — both layers of protection apply.