Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Password Protect an Excel File (Step by Step)

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To put a password on an Excel document, open the file, go to File > Info > Protect Workbook > Encrypt with Password, type a password, and save. The same dialog is available on Windows and Mac desktop versions of Excel; the exact wording of the menu can differ slightly by version and region. Once saved, anyone opening the file must enter the password before they can see any of the content. You need the desktop Excel app (Microsoft 365 or a recent standalone version) and the file itself; the free Excel for the web cannot add a password, so you have to do it on a computer.

What You'll Need

  • The Excel desktop app on Windows or Mac (Microsoft 365 or a recent version such as Excel 2019 or 2021).
  • The workbook you want to protect, saved somewhere you can write to.
  • A password you will remember or store safely. There is no recovery option if you lose it.

Step-by-Step

  1. Open the workbook in the Excel desktop app.
  2. Click File in the top-left corner, then choose Info.
  3. Click the Protect Workbook button. In the menu that appears, choose Encrypt with Password.
  4. Type your password in the box and click OK. Excel will ask you to confirm it; type it again and click OK.
  5. Save the file with Ctrl+S (Windows) or Command+S (Mac). The password is only applied once the file is saved.
  6. Close the file and reopen it to test. Excel should ask for the password before showing any sheets. If it does, the protection is working.

That is the whole process for a standard password. If you also want to stop people changing the structure of the workbook (adding, deleting, or renaming sheets), use Protect Workbook again and choose Protect Workbook Structure instead; that is a separate lock from the open password and can be set with or without one.

Common Mistakes

  • Not saving after setting the password. The password is stored in the file, so if you close without saving, it is gone. Always save and then reopen to confirm.
  • Using Excel for the web. The browser version does not offer the Encrypt with Password option. Open the file in the desktop app to add or remove a password.
  • Forgetting the password. Microsoft cannot recover it. There is no back door, no support reset, and no way to open the file without it. Keep the password in a password manager.
  • Confusing the open password with sheet protection. Encrypt with Password stops the file from opening at all. Protect Sheet only stops editing of cells and is easy to bypass. Use the right one for the job.
  • Typing the password with Caps Lock on or a different keyboard layout. Passwords are case-sensitive. Test by reopening the file before you send it to anyone.

Tips

  • Use a long passphrase rather than a short word. Excel accepts long passwords, and length matters more than complexity.
  • Store the password in a password manager and share it through a separate channel from the file (for example, send the file by email and the password by chat or phone).
  • If you are emailing the file, remember that the password protects the file contents but not the email itself. Keep the password out of the same message.
  • For a workbook you share with a team, consider whether a password is the right tool. If people need to edit it regularly, a shared location with permissions may be easier to manage than passing a password around.
  • Keep an unprotected backup before you add a password, in case you mistype the password during setup and lock yourself out.

Troubleshooting

If Excel does not ask for a password when you reopen the file, the most likely cause is that the change was not saved. Open the file, set the password again, and save immediately. If the option is greyed out, check that you are in the desktop app and that the file is not open read-only or in Protected View; close and reopen it from a normal folder.

If you cannot open a file because you do not know the password, there is no official recovery. Microsoft support cannot unlock it. Your realistic options are to restore an earlier unprotected copy from a backup, from version history in OneDrive or SharePoint (if the file was stored there before the password was added), or from an email attachment. Do not download password-removal tools from unknown sites; many are malware.

If the password is rejected even though you are sure it is correct, check Caps Lock, Num Lock, and your keyboard language. Try typing it into a plain text field first to see what is actually being entered, then copy and paste it into the Excel prompt.

Frequently Asked Questions

Can I password protect an Excel file on my phone?

The Excel mobile app does not offer the Encrypt with Password option. You need the desktop app on Windows or Mac to add or remove the password.

Can I remove the password later?

Yes. Open the file with the password, go to File > Info > Protect Workbook > Encrypt with Password, delete the password, and save. The file will then open without a prompt.

Is the password strong encryption?

Excel uses standard encryption for the file, but the strength depends on the version. Modern versions use stronger encryption than very old ones. For sensitive data, use a long passphrase and keep the file on a trusted device.

What happens if I forget the password?

The file cannot be opened. Microsoft has no recovery service. Restore an earlier copy from backup or version history if one exists.

Does the password stop people from editing the file?

No. Encrypt with Password controls opening only. To restrict editing, use Protect Workbook Structure or Protect Sheet, which are separate options under the Review tab.

Can I password protect only part of a workbook?

You can protect individual sheets or the workbook structure, but the open password applies to the whole file. There is no built-in way to require a password for one sheet while leaving others open.