Encrypt an Excel File with a Password: Steps and Tips

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. You will need that password to open the encrypted workbook.

Encrypt a workbook in Excel for Windows

Use the desktop Excel app and follow these steps. The labels below are for Excel for Microsoft 365 on Windows; some older versions may display slightly different options.

  1. Open the workbook you want to protect. If it is important, first save a separate backup in a secure location.
  2. Select File to open Backstage view, then choose Info.
  3. Select Protect Workbook, then choose Encrypt with Password from the menu.
  4. Type a strong password in the dialog box and select OK. Type it again when prompted to confirm.
  5. Save the workbook. Close it and reopen it to check that Excel requests the password.

Excel does not display the password as you type it, and it does not provide a way to retrieve a forgotten one. Keep a secure record before you close the file. If you enter the wrong password during confirmation, Excel asks you to try again; if you later cannot remember the confirmed password, the workbook may be inaccessible.

Choose a password you can manage safely

A password should be difficult for someone else to guess but available to the people who legitimately need the workbook. A long, unique passphrase is generally easier to manage than a short password built from a name, date, or familiar phrase. Do not reuse a password from your email, work account, or another important service.

For a workbook shared with a team, decide who is responsible for storing and distributing the password. A password manager approved by your organization is usually safer than a message thread or a note saved beside the workbook. If you send the file as an email attachment, send the password through a separate, appropriate channel rather than putting both in the same email. That separation reduces the chance that one compromised message exposes both items.

Think about access before setting the password. If several coworkers need the file, make sure there is a reliable handover plan for staff changes, leave, or emergencies. A password that only one person knows can protect a document from casual access but also create a business continuity problem.

What file encryption does—and what it does not do

Encrypt with Password protects access to the workbook’s contents: Excel asks for the password before opening the file. This is different from merely hiding a worksheet or preventing a user from changing a cell. Encryption is useful when a saved file might be copied, attached to an email, or stored somewhere that other people could access.

It is not a substitute for careful handling. Once someone opens the workbook with the password, they may be able to copy information, take screenshots, or save another version. Encryption also does not decide which individual people are authorized; anyone who has the password can try to open the file. Use access controls on the storage location as well, and share the password only with intended recipients.

Encryption protects the saved workbook, not every copy of its data. For example, a recipient could paste a customer list into an unprotected workbook. Excel’s password feature does not automatically encrypt exports, screenshots, printed pages, or copies in other formats. Consider what information is inside the file and how it will be used after opening.

Encryption compared with sheet and workbook protection

Excel has several protection options with similar names but different purposes. Choosing the wrong one is a common reason people believe a spreadsheet is password-protected when its contents are still readable.

  • Encrypt with Password: requires a password to open the workbook and is the option for restricting access to its contents.
  • Protect Sheet: helps limit changes to cells or worksheet elements. It is not intended to keep someone from reading the sheet’s contents.
  • Protect Workbook structure: can restrict actions such as adding, moving, deleting, hiding, or renaming sheets. It does not encrypt the data in the file.

You can use sheet or structure protection alongside file encryption, for example when recipients should be able to view a workbook but not casually change its layout. These protections solve separate problems, however; they do not replace encryption when the goal is to require a password before the file can be read.

Remove or change the password

To remove the open password in Excel for Windows, open the workbook with its current password and go to File > Info > Protect Workbook > Encrypt with Password. Clear the password field, select OK, and save the workbook. Close and reopen the saved copy to confirm that Excel no longer asks for a password. Keep the original protected copy until you are sure you changed the intended file.

To change the password, use the same menu, replace the existing password with the new one, confirm it, and save. Excel requires the current password to open the protected file before you can change its encryption setting. Do not assume that renaming the file or saving a copy under a different name removes protection; check the saved result by reopening it.

Sharing, cloud storage, and compatibility

Excel for the web does not provide the desktop command for adding password encryption to a workbook. Use the desktop Excel app to apply or change the password. Password-encrypted workbooks can also have limitations in browser-based workflows, so recipients may need to download the file and open it in desktop Excel. Tell recipients in advance if they will need the desktop app and password.

On a Mac, the menu differs from the Windows path. In current desktop Excel for Mac, use File > Passwords to set a password to open the workbook, then confirm it and save. If you do not see that command, check that you are using the desktop application and consult the help for your installed Excel version; web Excel does not offer the same desktop encryption controls.

Before sharing, verify that each recipient can open the file with the intended password and that they have the required Excel app or compatible software. If a workbook is stored in OneDrive or SharePoint, use the storage service’s sharing permissions as an additional access control. Those permissions govern access to the stored file, while the workbook password is a separate barrier applied to the document itself.

Common problems and practical checks

If Excel does not ask for a password when you reopen the workbook, check whether you selected Encrypt with Password rather than a sheet or structure protection option. Also confirm that you saved the workbook after setting the password and reopened the correct file; similarly named copies in Downloads, email attachments, and cloud folders can be easy to confuse.

If a recipient says the password does not work, check for typing mistakes, unintended spaces, and whether they are opening the latest file. Passwords are case-sensitive, so capitalization matters. Send the password securely and clarify whether it applies to opening the file or to some separate protected sheet. Avoid repeatedly forwarding copies with different passwords, since that makes it harder to identify which version is authoritative.

If you forget the password, Excel does not offer a built-in password recovery or reset process for an encrypted workbook. Look for a safely stored password, an earlier unencrypted backup, or an authorized copy in your organization’s approved storage. Do not rely on an unverified third-party recovery tool for sensitive files: handing it the workbook could expose the data, and recovery is not guaranteed.

Frequently Asked Questions

Can I password-protect an Excel file so people cannot open it?
Yes. Use File > Info > Protect Workbook > Encrypt with Password in desktop Excel for Windows. This is the open-password option; worksheet protection alone does not prevent someone from viewing the workbook.

Can I encrypt an Excel file for free?
The encryption command is part of desktop Excel, so it does not require a separate encryption add-on. Whether you can use desktop Excel depends on the software and license available to you. Excel for the web does not offer the same command for setting an open password.

Can I recover a forgotten Excel password?
Excel has no built-in way to recover or reset the password for an encrypted workbook. Check your password manager, secure records, or legitimate backups. Keep a protected backup before you set a password, and store the password separately from the file.

Does Protect Sheet encrypt the workbook?
No. Protect Sheet is intended to limit worksheet changes, not to keep the contents confidential. To require a password before someone can open the workbook, use Encrypt with Password.

Can I open a password-encrypted workbook in Excel for the web?
Browser support for password-encrypted workbooks is limited. The dependable option is to open the file in desktop Excel and enter its password; recipients should be told they may need the desktop app.

Does changing the file extension remove its password?
No. Renaming a workbook from one extension to another does not remove its encryption and can make the file harder to open. Remove the password through Excel’s encryption settings, then save and test the resulting workbook.

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.