Encrypt and Password-Protect an Excel File

How-to basics · Updated November 22, 2026

To encrypt an Excel file with a password in Microsoft Excel for Microsoft 365 on Windows, open the workbook and select File > Info > Protect Workbook > Encrypt with Password. Enter and confirm a password, then save the file. Anyone who needs to open the encrypted workbook will need that password.

Encrypt a workbook: quick steps

Use Excel’s file-encryption option when the goal is to stop someone without the password from opening the workbook. The command is in the desktop app, not on the worksheet ribbon.

  1. Open the workbook you want to protect. If it is a new workbook, save it first.
  2. Select File > Info.
  3. Select Protect Workbook, then Encrypt with Password.
  4. Type a password in the password box and select OK.
  5. Type the same password again to confirm it, select OK, and save the workbook.

Close the file and reopen it to check that Excel asks for the password. This is a useful check before sharing the workbook, but do not use it as a test by sending the file to someone else. Excel does not provide a password-recovery service for an encrypted workbook, so keep the password somewhere secure before relying on it.

What Excel encryption protects

Encrypt with Password protects access to the workbook file itself. A person who does not know the password should not be able to open and read the workbook’s contents in Excel. This is different from hiding a sheet or preventing edits: file encryption is intended to restrict opening, while sheet and workbook protection control certain actions after a file has been opened.

For example, a workbook containing staff contact details may need an opening password before it is sent as an attachment. A project tracker that colleagues may view but should not rearrange may instead need worksheet protection. These solve different problems, and using one does not automatically provide the other.

Excel’s password encryption is not the same as renaming a file, marking it read-only, or putting a password on a ZIP archive. Those approaches have different security properties. Nor does an opening password prevent an authorized recipient from taking a screenshot, copying information after opening the workbook, or sharing the password. Consider who will receive the file and what they can do with its contents once access is granted.

Choose the right kind of password protection

The Protect Workbook menu includes several protections that sound similar. Choose based on the action you want to restrict:

  • Encrypt with Password: requires a password to open the file. Choose this for confidential workbook contents.
  • Protect Sheet: restricts selected actions on a worksheet, such as editing locked cells. It is not a substitute for encrypting the file.
  • Protect Workbook structure: restricts changes to the workbook’s sheet structure, such as adding, moving, deleting, hiding, or renaming sheets. It does not by itself prevent someone from opening the file.
  • Read-only recommendations or file permissions: may discourage changes or control access through a managed service, but they are not the same as a password required to decrypt and open the workbook.

It is possible to combine protections. For instance, encrypt a payroll workbook so only approved people can open it, then protect formula cells on a sheet to reduce accidental edits. Sheet protection is mainly an editing control, not a strong confidentiality boundary; Microsoft describes it as protection against modification rather than a security feature for sensitive data.

How to change or remove the password

If you know the current password and want to replace it, open the workbook with that password, then go to File > Info > Protect Workbook > Encrypt with Password. Replace the text in the password box, select OK, confirm the new password, and save the workbook. Share the updated password with authorized users using a separate, appropriate channel.

To remove the opening password, follow the same path and delete the password so the box is blank. Select OK, then save the workbook. Close and reopen it to verify that Excel no longer requests the password. Do not confuse this with selecting Unprotect Sheet, which removes a worksheet editing restriction rather than file encryption.

If you have forgotten the opening password, Excel generally cannot recover or reset it for you. Do not assume that Microsoft Support can decrypt the file. Look for a valid earlier copy, check a password manager or approved organizational record, or ask the person who created the workbook. Avoid uploading confidential files to unfamiliar password-recovery websites or tools.

Create and store a strong password

A password that is short, reused, or based on public details is easier to guess. Use a unique password that is difficult to predict, and consider a long passphrase made from unrelated words if your organization’s rules allow it. Do not use the workbook’s filename, a colleague’s name, a date, or a simple sequence as the password.

  • Use a password manager to generate and store a unique password.
  • Share the password separately from the workbook, such as through an approved secure messaging or credential-sharing method.
  • Limit access to people who need the workbook, and remove access when it is no longer needed.
  • Keep a controlled recovery record for business-critical files, following your organization’s security policy.

Emailing the workbook and its password in the same message gives an unintended recipient both items at once. Sending them through separate channels reduces that particular risk, though it does not replace appropriate access controls or careful handling of the file.

Limits, compatibility, and sharing

Excel for the web does not provide the desktop command to add or change this kind of password encryption, and Microsoft says it cannot open workbooks encrypted with a password. If a recipient needs to work in a browser, agree on a compatible sharing method before encrypting the file. A file stored in OneDrive or SharePoint may be shared through the service’s access controls instead; those controls govern who can access the online file and are separate from workbook encryption.

On Excel for Mac, the exact controls and labels can vary by release. Recent desktop versions provide password settings through File > Passwords; check the menus in the installed version and confirm that the setting is a password to open the workbook, rather than a password to modify it. If a recipient uses another spreadsheet application, test compatibility with a non-sensitive copy first. Encrypted Office files may not be supported consistently by other programs.

Also consider how the file will be used after opening. A password does not stop an authorized person from forwarding an unencrypted copy, printing it, or copying its data. For workbooks that require controlled distribution, an organization may need managed storage, access permissions, auditing, or information-protection tools in addition to or instead of a shared password. The right option depends on the sensitivity of the information and the recipients’ software.

Common problems and fixes

  • The password prompt does not appear: confirm that you used File > Info > Protect Workbook > Encrypt with Password and saved the file. Protect Sheet alone will not add an opening password.
  • The recipient cannot open the file in a browser: Excel for the web cannot open a workbook encrypted with a password. Use a compatible desktop version or a suitable managed sharing option.
  • The password seems correct but is rejected: check capitalization, keyboard layout, and whether Caps Lock or a different input language is active. Passwords are case-sensitive. Confirm you are entering the opening password, not a separate sheet or modification password.
  • The file opens without asking after you set a password: make sure you saved the encrypted workbook and are opening that saved file, not a different copy or an older attachment.
  • You need to remove protection but do not know the password: identify which protection is in use and contact the workbook owner. For file encryption, Excel does not offer a built-in password reset.

When diagnosing an issue, work on a copy if you can. This reduces the chance of accidentally overwriting the only usable version while checking settings or trying a different sharing workflow.

Alternatives for controlling access

A password on the workbook is practical when a small group needs to exchange a file, but it can become hard to manage when recipients change or multiple copies circulate. For ongoing collaboration, store the workbook in a location such as OneDrive or SharePoint and assign access to named accounts where those services and your organization’s policies permit. You can then revoke a person’s access without changing a password known to the whole group.

If the requirement is to prevent accidental changes, use worksheet or workbook-structure protection rather than an opening password. If the requirement is to avoid exposing sensitive data at all, consider whether every recipient needs the full workbook; sharing a reduced copy with only necessary fields may be safer. Do not treat hiding rows, columns, or sheets as a way to keep confidential information secret, because those features are not equivalent to encryption.

Frequently Asked Questions

Can I password-protect an Excel file without encrypting it?
Excel has protections for worksheets and workbook structure that restrict certain edits, but those do not provide the same opening protection as Encrypt with Password. To prevent a person from opening and reading the workbook, use file encryption.

Is Protect Sheet the same as encrypting an Excel file?
No. Protect Sheet limits actions on a worksheet after the workbook has been opened. Encrypt with Password requires a password to open the workbook and protects access to its contents at the file level.

Can I recover a forgotten Excel opening password?
Excel does not provide a built-in reset or recovery method for an encrypted workbook. Check secure password records, earlier copies, or the workbook’s creator. Be cautious about third-party recovery services, especially with confidential files.

Can someone open a password-encrypted workbook in Excel for the web?
No. Excel for the web cannot open a workbook encrypted with a password. Use a compatible desktop app or choose an appropriate online sharing and access-control method instead.

Does a password stop recipients from copying or sharing the data?
No. It controls opening the file, but a recipient who has the password can view the workbook and may copy, print, or share its contents. Use access management and sensible data minimization when those risks matter.

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.