Can You Encrypt an Excel File? Protect It Securely

How-to basics · Updated November 21, 2026

Yes. In Excel for Microsoft 365 on Windows, open the workbook and choose File > Info > Protect Workbook > Encrypt with Password, then enter and confirm a password and save the file. This encrypts the workbook so someone generally needs the password to open and read it; it is different from merely protecting a worksheet or workbook structure.

What Excel encryption does

Encryption transforms a file’s contents into data that cannot be read normally without the correct key, which Excel derives from the password. When you enter the password to open an encrypted workbook, Excel decrypts the data so you can work with it. If you close the workbook and share the file, the recipient still needs the password to open it.

For current Microsoft 365 workbooks saved in modern formats such as .xlsx, Excel uses file-level encryption. The practical point is that the protection applies to the workbook contents, not just to selected cells or a particular worksheet. Exact behavior and compatibility can depend on the file format and the software used to open it, especially for older Excel files.

Encryption is most useful when a workbook contains information that should not be visible to anyone who obtains a copy of the file—for example, confidential client details, employee records, or a budget that should not be circulated openly. It does not make a workbook impossible to steal or guarantee that an authorized reader will not copy its contents.

How to encrypt a workbook in Excel for Windows

In the desktop version of Excel for Microsoft 365 on Windows, use the built-in password encryption option:

  1. Open the workbook you want to protect.
  2. Select File > Info.
  3. Select Protect Workbook, then Encrypt with Password.
  4. Enter a password and select OK. Enter it again when Excel asks you to confirm it.
  5. Save the workbook. Close it and reopen it to confirm that Excel asks for the password.

Use the exact password you intend to distribute, and check that you can reopen the saved file before sending it. Excel does not provide a normal password-recovery process for a forgotten file-open password. Keep the password somewhere separate from the workbook, such as in a reputable password manager. If you send the file by email, do not put the password in the same email thread; share it through a separate, appropriate channel.

On Excel for Mac, the available controls differ: use File > Passwords to set a password to open the workbook. The labels and options can vary by Excel version. Excel for the web does not provide the desktop command for adding or changing a workbook password; use the desktop app for that task. A password-encrypted workbook may also need to be opened in desktop Excel rather than edited in a browser.

Choose a strong password and keep it recoverable

A file password is only as resistant to guessing as the password itself. A short or predictable password—such as a person’s name, a company name, or a simple sequence—can undermine encryption. Use a long, unique password that is not used for another account. A password manager can generate and store one, or you can use a memorable passphrase made from unrelated words with additional characters if appropriate.

Plan for legitimate access as well as security. If the workbook is important, decide who is responsible for keeping the password and how an authorized colleague can obtain it if that person is unavailable. For a team, follow the organization’s approved password-sharing and records policies rather than keeping the only copy in one person’s memory. Do not store the password in a cell, worksheet note, filename, or message attached to the workbook.

Changing a password can help when access needs to be reassigned or a password may have been exposed. It does not revoke any unencrypted copies already downloaded or opened by another person. If a recipient already has the password and a copy, treat that copy as potentially accessible even after you change the password on your own file.

File encryption versus worksheet protection

Excel has several protection features that sound similar but serve different purposes. Encrypt with Password protects the contents of the file while it is closed. By contrast, Review > Protect Sheet restricts actions in a worksheet, such as editing locked cells. Review > Protect Workbook can restrict changes to workbook structure, such as adding, deleting, or moving sheets.

Sheet and structure protection are useful for reducing accidental edits or guiding users through a template. They are not substitutes for file encryption when the goal is to keep someone who has the file from reading its data. A protected sheet can still expose information to someone who can access the workbook, and protection features should not be treated as a confidentiality boundary.

Similarly, hiding a sheet or setting a cell range to locked does not encrypt that information. If a workbook contains data that a recipient must not see, remove that data from the copy you share or use an approved sharing method that limits access. Do not rely on hidden rows, hidden sheets, or worksheet protection to conceal sensitive material.

Passwords to open and passwords to modify

Excel can also distinguish between a password needed to open a file and a password associated with modifying it. A password to open is the important choice when confidentiality is the goal: without it, the recipient should not be able to view the workbook contents in Excel. A password-to-modify arrangement is intended to control editing, not to hide the information from someone who can open the file.

Some save and compatibility options can let a recipient open a workbook as read-only or choose to edit it, depending on how the file was configured. That kind of prompt should not be confused with encryption. When deciding what to share, ask whether the recipient must be prevented from seeing the data, prevented from changing it, or simply encouraged to avoid accidental edits. Those are different requirements and call for different controls.

Formats, sharing, and practical limitations

Modern Excel formats such as .xlsx and macro-enabled .xlsm can be password-encrypted in desktop Excel. The workbook extension does not tell you that a file is encrypted: a password prompt when opening is a more useful confirmation. Older .xls files and files opened in non-Microsoft spreadsheet programs may behave differently, so test compatibility with the intended recipient before relying on a particular workflow.

Encryption protects the file itself; it does not automatically secure every copy or every place the workbook is stored. A copy saved to an unmanaged device, attached to a message, or placed in a folder with broad access can still create exposure. Cloud services may provide their own encryption and access controls, but those are separate protections and do not mean the workbook has an Excel open password.

Once a person has opened the workbook, Excel encryption cannot prevent that person from reading displayed data, taking a screenshot, copying cells, or saving another accessible version. It also does not protect a password typed into a compromised computer. Use encryption alongside sensible file permissions, secure devices, and careful sharing practices—not as a replacement for them.

Changing or removing an Excel password

If you know the current password and want to change or remove it, open the workbook in desktop Excel and first make sure you are working on the correct file. In Windows, go to File > Info > Protect Workbook > Encrypt with Password. To change the password, replace the existing entry and confirm the new one. To remove it, clear the password field, select OK, and save the workbook. Excel for Mac provides password controls through File > Passwords.

After changing or removing protection, save and reopen the file to verify the result. If you remove the open password, the saved copy is no longer protected by that password. Keep a backup before making changes if the workbook is important, and avoid leaving an unencrypted copy in a shared folder or temporary location by mistake.

Common problems and misconceptions

  • The workbook does not ask for a password. It may be protected only at the sheet or structure level, or you may have opened a different copy. Check the file in desktop Excel and verify its protection settings.
  • You cannot remember the password. Excel does not offer a standard way to recover a forgotten open password. Check your password manager or approved organizational records. Be wary of tools or services that promise guaranteed recovery, particularly if they ask you to upload confidential files.
  • A recipient cannot open the workbook. Confirm that you supplied the correct password and that the recipient is using a compatible Excel version or another supported application. Share the password through a separate secure channel.
  • The workbook is protected, so its data must be secret. Not necessarily. Worksheet protection and hidden sheets do not provide the same confidentiality as file-level encryption.

If an encrypted workbook contains business-critical information, test your organization’s backup and access procedures before the file becomes difficult to replace. A forgotten password can turn a protective measure into a barrier for the people who are supposed to use the data.

When another security approach may be better

A password-encrypted workbook is a straightforward option for protecting a file that must be sent or stored as a standalone document. For ongoing collaboration, however, sharing from an organization-managed cloud location may be more practical. Access permissions can make it easier to grant or revoke access and reduce the number of uncontrolled attachments. Follow your organization’s rules for confidential data, external sharing, retention, and approved storage.

Organizations using Microsoft 365 may also have tools such as sensitivity labels or information-protection policies, depending on their subscription and administrator settings. These can apply broader rules to documents, but availability and behavior vary. Ask your IT or security administrator which controls are approved rather than assuming a label is enabled or that it replaces a workbook password in every situation.

For a one-time handoff, consider whether the recipient needs the whole workbook. Sharing a reduced copy with only the necessary sheets and data can lower the consequences of accidental disclosure. Review formulas, comments, hidden content, and linked data before sharing. Removing unnecessary information is often more effective than trying to hide it inside a workbook the recipient can open.

Frequently Asked Questions

Can I encrypt an Excel file without a password?
No. Excel’s built-in file encryption uses a password to control opening the workbook. If you need access management without distributing a shared file password, consider an approved cloud-sharing or organizational information-protection option.

Does protecting a sheet encrypt the Excel file?
No. Protect Sheet restricts certain edits in a worksheet; it does not provide the same file-level confidentiality as Encrypt with Password. Use the file-open encryption option when you need to prevent someone without the password from viewing the workbook.

Can I recover an Excel file password if I forget it?
Excel does not provide a standard password-reset mechanism for an encrypted workbook. Check any password manager or authorized records where the password may have been stored. Keep a secure recovery plan for important files before a password is forgotten.

Can I password-protect an Excel file in a browser?
Excel for the web does not offer the desktop command to add or change an open password. Use desktop Excel for Microsoft 365 on Windows or the password controls in Excel for Mac, then test how the recipient can open the file.

Does encryption stop someone from copying data after opening the file?
No. Encryption protects the file while access is locked. Once a person has opened the workbook, it cannot reliably prevent copying, screenshots, or other ways of recording visible information.

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.