How to Password Protect an Excel Workbook in Windows

How-to basics · Updated November 20, 2026

To password-protect an Excel workbook in Microsoft 365 for Windows, open it and choose File > Info > Protect Workbook > Encrypt with Password. Enter a password, confirm it, and save the workbook. This encrypts the file so someone needs the password to open it; protecting a worksheet is a different feature and does not provide the same security.

What Excel password protection does

Excel has several protection features with similar names but different purposes. The key distinction is whether you want to keep people from opening the file or simply limit what they can change after opening it.

  • Encrypt with Password: Requires a password to open the workbook. This is the right choice when the contents themselves should be private.
  • Protect Sheet: Restricts editing actions on a particular worksheet, such as changing locked cells. It is intended to prevent accidental or unauthorized changes, not to conceal the sheet’s contents.
  • Protect Workbook: Can protect the workbook’s structure, limiting actions such as adding, deleting, moving, or renaming sheets. It does not encrypt the contents against someone opening the file.

For example, a budget shared with a colleague might need a password to open if it contains confidential figures. A blank form distributed to a team might instead use sheet protection to keep labels and formulas from being overwritten. You can use both kinds of protection when appropriate, but they solve different problems.

How to encrypt a workbook in Excel for Windows

These steps apply to desktop Excel for Microsoft 365 on Windows. Keep an unencrypted backup in a secure location if you need one, and make sure you can retrieve the password before applying it.

  1. Open the workbook you want to protect.
  2. Select File to open the Backstage view, then select Info.
  3. Choose Protect Workbook, then select Encrypt with Password.
  4. Enter a strong password in the password box and select OK.
  5. Enter the same password again when prompted, then select OK.
  6. Save the workbook. Close it and reopen it to confirm that Excel asks for the password.

Excel passwords are case-sensitive, so capital letters, spaces, and punctuation must be entered consistently. The password is not a label or reminder: if the file is encrypted, it is needed to decrypt and open the workbook. Store it in a reputable password manager or another secure place separate from the workbook.

Choose a strong password and keep access recoverable

A password should be difficult for someone else to guess but practical for authorized users to retrieve. A long, unique passphrase is usually easier to manage than a short, complicated-looking password. Avoid names, company names, birthdays, project titles, and predictable patterns. Do not reuse a password that protects your email, cloud account, or another important file.

There is a trade-off between protection and recoverability: Microsoft does not provide a way to retrieve a forgotten workbook encryption password. If nobody has the correct password, the contents may be inaccessible. Before protecting an important file, confirm who needs access, decide how they will receive the password, and keep a secure record. For a team, use an approved password manager or access-management process rather than putting the password in the same email as the attachment.

Also consider what happens when the file is copied. Encryption protects the workbook itself, but it does not stop an authorized person from saving another copy, photographing information on screen, or sharing the password. Limit distribution to people who need the file, and remove access through your storage or sharing service when it is no longer needed.

Protect a sheet or workbook structure instead

If your goal is to prevent changes rather than prevent opening, use Excel’s editing protections. For an individual worksheet, select Review > Protect Sheet, choose which actions users may perform, and enter a password if you want one. For workbook structure, select Review > Protect Workbook, choose the structure option if shown, and set a password.

These controls are useful for reducing mistakes. For instance, a worksheet with formulas can be protected so users enter data only in designated cells. Sheet protection can also allow specific actions, such as selecting unlocked cells or sorting, depending on the options selected. Test the result with a copy of the workbook to make sure the allowed actions match what users need.

Do not treat sheet or structure protection as a confidentiality boundary. A person who can open the workbook can see its contents, and these protections are not a substitute for file encryption, account permissions, or appropriate secure storage. If confidentiality matters, use Encrypt with Password as well as any editing restrictions you need.

Excel on Mac and Excel for the web

On Excel for Mac, the controls and labels can differ from Windows. In current desktop versions, look for File > Passwords to set a password to open the workbook; some versions also offer a password to modify it. Menu availability and wording can vary by release, so check the current Excel for Mac menus if that command is not present. After setting a password, save, close, and reopen the file to verify the behavior.

Excel for the web does not provide the same workflow for adding or changing password encryption, and password-encrypted workbooks cannot be opened in the browser. Open the file in the Excel desktop app to apply or manage file encryption. If you need browser-based collaboration, consider whether controlling access through OneDrive or SharePoint permissions is a better fit for the task; those permissions manage who can reach a file, whereas an encryption password travels with the workbook.

For an organization, follow its approved storage and sharing rules. A workbook shared through a managed service may be easier to revoke or update than an emailed copy, but sharing permissions do not make a weak password strong or protect copies already downloaded by recipients.

How to remove or change the password

If you know the existing password and want to remove encryption in Excel for Windows, open the workbook and enter its password. Go to File > Info > Protect Workbook > Encrypt with Password, delete the password from the box, select OK, and save the workbook. Close and reopen it to confirm that Excel no longer requests a password.

To change the password, follow the same steps but replace the existing entry with a new one, confirm it if prompted, and save. Tell authorized users through a secure channel, and update any password-manager record. If the workbook is stored in a shared location, consider whether old copies or downloads may still be protected by the former password; changing the password on one copy does not update separate copies automatically.

If you have forgotten the password, Excel does not offer a supported recovery feature that reveals it. Check a password manager, secure team records, or a version of the file saved before encryption. Be cautious about third-party “unlocking” services and tools, especially with sensitive files: uploading a workbook can disclose its contents, and claims of guaranteed recovery should not be assumed to be reliable.

Common problems and practical checks

  • The file opens without asking for a password: You may have protected a sheet or workbook structure rather than encrypting the file. Check File > Info > Protect Workbook for the encryption setting.
  • A recipient says the password does not work: Check capitalization, keyboard layout, accidental spaces, and whether they are opening the latest copy. Send the password separately from the file and avoid pasting extra spaces.
  • The file will not open in a browser: A password-encrypted workbook is not supported for opening in Excel for the web. Use desktop Excel and enter the password.
  • Someone can still change or copy information: Opening protection controls access to the workbook, not what an authorized reader can do after opening it. Use sharing permissions and limit access where needed.
  • You forgot the password: Look for a secure record or an earlier unencrypted backup. There is no Microsoft password reset for workbook encryption.

Before sending a protected workbook, test the exact file you plan to distribute: save it, close it, reopen it, and enter the password. If the recipient needs to edit it, confirm they can save changes and work with the features they require. A small test prevents confusion caused by sending an older copy or relying on protection that only blocks editing.

Frequently Asked Questions

Can I password-protect only one worksheet?
Yes. Select Review > Protect Sheet and choose the editing actions to allow. This restricts changes but does not hide the worksheet’s contents or encrypt the whole workbook.

Is Protect Sheet the same as Encrypt with Password?
No. Protect Sheet limits editing on a worksheet. Encrypt with Password requires a password to open the workbook and is the relevant option when you need to restrict access to its contents.

Can Microsoft recover a forgotten Excel password?
No. Microsoft does not provide a recovery method for a forgotten password used to encrypt a workbook. Keep a secure record and a suitable backup before relying on encryption.

Can I open a password-protected workbook in Excel for the web?
Not when it is encrypted with a password to open. Use the Excel desktop app and enter the password. Excel for the web also cannot apply the same file-encryption setting.

Does workbook encryption stop recipients from sharing the file?
No. It requires the password to open the file, but an authorized recipient may still make or share copies. Share only with intended users and use storage permissions where you need to manage access.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.