Can You Encrypt an Excel Spreadsheet? Here’s What Works

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 a person generally needs the password to open it; it is different from simply protecting a worksheet from edits.

What Excel encryption means

When you use Encrypt with Password, Excel applies password-based encryption to the workbook file. The password is needed before the workbook’s contents can be opened in Excel. This is useful if a file containing private or commercially sensitive information is copied, emailed, or left on a shared drive: possession of the file alone should not be enough to read its contents.

Encryption is a barrier to unauthorized access, not a guarantee that information can never be exposed. Someone who knows the password can open the file and may be able to copy or photograph its contents. A weak or reused password may be guessed, and a password sent in the same email as the workbook offers little separation. Encryption also does not hide the file’s name, its approximate size, or the fact that a file exists.

Use a current Excel workbook format such as .xlsx, or .xlsm if the workbook contains macros. Older .xls files use a legacy format and may behave differently across Excel versions. If you must exchange a legacy file, check that the recipient can open it and that the protection remains in place after saving or converting it.

How to encrypt a workbook in Excel for Windows

In the desktop version of Excel for Microsoft 365 on Windows, use these steps. The workbook does not need to be open to others first, but make sure you are working with the correct file and can safely save the change.

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

Passwords are case-sensitive. Excel does not provide a reliable way to retrieve a forgotten password for an encrypted workbook, so store it in a reputable password manager or another secure place before closing the file. Do not put the password in a note inside the workbook or send it alongside the file through the same channel.

If you need to change the password, open the workbook with its current password and return to File > Info > Protect Workbook > Encrypt with Password. Clear the password field to remove the existing password, save the file, and then repeat the encryption steps with the new password. Handle the unprotected interval carefully, particularly if the file is in a shared folder.

Excel for Mac and Excel for the web

Excel for Mac also supports password protection, but its controls are not in the same Windows Info pane. In Excel for Microsoft 365 for Mac, open the workbook and choose File > Passwords. Set a password to open the workbook, confirm it, and save. Menu wording can vary by Mac version. Keep a secure record of the password: forgetting it can prevent access just as it can on Windows.

Excel for the web does not let you set or remove this kind of password encryption. Password-encrypted workbooks may need to be opened in the desktop app rather than in a browser. If you need to protect a workbook, use the desktop app first, then verify that the intended recipients can open it in the version of Excel they use. Do not assume browser-based sharing permissions are the same as a password attached to the file.

File encryption versus worksheet protection

Excel has several features called protection, and their purposes are easy to confuse. Encrypt with Password is the option that protects access to the workbook file itself. Other protection settings limit particular actions after someone has opened the workbook; they are not substitutes for encryption.

  • Encrypt with Password: requires a password to open the workbook and protects its contents while the file is closed.
  • Protect Sheet: can restrict changes to cells, formulas, or objects on a worksheet. It is useful for preventing accidental edits, but it is not designed to keep the worksheet’s contents secret.
  • Protect Workbook structure: can restrict structural changes such as adding, deleting, hiding, or renaming sheets. It does not by itself stop someone from opening and reading the workbook.
  • OneDrive or SharePoint permissions: control who can access a cloud-stored file and what they can do with it. These access controls are separate from a password used to encrypt the workbook.

For example, a business might encrypt a workbook containing employee details so an unauthorized person cannot open a copied file, then protect a sheet to reduce accidental changes by authorized staff. The two controls address different risks. Sheet protection alone would not make the employee details confidential.

Choosing and handling a strong password

A password should be difficult to guess and practical for the people who genuinely need access. A long, unique passphrase is generally easier to manage than a short password built from a name, date, or familiar word. Avoid using a password that already protects your email, computer account, or another important service.

  • Use a password manager to create and store a unique password.
  • Share the password through a separate trusted channel from the workbook, such as a secure company messaging system.
  • Limit the recipient list and remove access when people no longer need the file.
  • Keep an authorized recovery copy or documented handover process if the workbook must remain accessible when its creator is unavailable.
  • Before sending the file, check that it does not contain hidden sheets, old data, comments, or other information you did not intend to share.

Excel’s password prompt is not a password reset mechanism. If the password is lost, there may be no supported way to recover the workbook’s contents. Organizations should plan for continuity without putting passwords in an unprotected shared document. For a one-person file, a password manager entry may be sufficient; for a critical team workbook, follow the organization’s approved access and recovery process.

Sharing encrypted workbooks safely

Encryption protects the workbook file, but secure sharing still depends on how it is sent and stored. An email attachment may be forwarded, downloaded, or retained in several mailboxes. If you send an encrypted workbook, provide the password separately and verify the recipient’s identity before sharing it. For sensitive business information, use the company’s approved file-sharing service and access controls rather than a personal account.

OneDrive and SharePoint can offer account-based sharing permissions, such as granting access to selected people, instead of relying only on a password known to everyone who receives a copy. Those controls are useful for managing access to a cloud file, but they do not make a downloaded copy disappear. A recipient may save, print, or copy information depending on the permissions and tools available to them. Consider the data’s sensitivity and your organization’s rules before sharing.

Encryption also cannot protect information after an authorized user opens the workbook on an exposed or compromised device. Keep devices updated, use account security such as multifactor authentication where available, and avoid leaving sensitive files in public or shared locations. For especially sensitive information, consult your organization’s security team about approved storage and handling.

Common problems and limitations

If Excel does not ask for a password when you reopen the file, confirm that you used File > Info > Protect Workbook > Encrypt with Password, entered and confirmed the password, and saved the workbook. A sheet protection setting can look like password protection because it asks for a password when someone tries to edit, but it does not require a password merely to open the file.

If a recipient cannot open an encrypted file, check that they have the correct password, including capitalization, and a compatible desktop version of Excel. Confirm that the file was not damaged during transfer and that the recipient is opening the actual encrypted workbook, not an earlier copy. If the workbook is macro-enabled, the recipient may also need to allow macros according to their organization’s policy; that issue is separate from the password used to open the file.

Encryption can complicate automated processing, previews, and browser access because software needs the password before it can read the workbook. Test the workflow before making a protected file part of a recurring process. Also make a separate backup before changing protection or converting a file format. A backup is helpful only if it is stored securely and its access is controlled.

Costs and alternatives

There is no separate per-workbook fee for the Encrypt with Password feature in the desktop Excel app, although you need access to an Excel version that supports it. Cloud storage, organizational security features, or a Microsoft 365 subscription may have their own licensing and account requirements. Check the terms for the particular service or plan rather than assuming that every sharing or compliance feature is included.

If a password-protected workbook is not the right fit, choose a control that matches the need. For collaboration, share through OneDrive or SharePoint with specific people and appropriate permissions. For preventing accidental edits, protect sheets or the workbook structure. For preventing access to data on a lost computer, use device-level full-disk encryption and secure sign-in. These measures complement one another, but none should be described as interchangeable with password-encrypting the workbook file.

Frequently Asked Questions

Can you password-protect an Excel file so nobody can open it?
Yes. Use Encrypt with Password in desktop Excel. It requires the password to open the workbook, but it cannot prevent someone who has the password from copying or sharing its contents.

Is Protect Sheet the same as encrypting an Excel spreadsheet?
No. Protect Sheet restricts certain edits after a workbook has been opened. Use Encrypt with Password when the goal is to require a password before the workbook can be opened.

Can I recover a forgotten Excel encryption password?
Excel does not offer a dependable password-recovery option for an encrypted workbook. Keep the password in a secure password manager and plan an authorized recovery process before relying on the file.

Can I encrypt an Excel spreadsheet online?
Excel for the web does not provide the desktop password-encryption controls. Use Excel for Windows or Mac to set the password, then check that the people who need the file can open it in a compatible app.

Does encrypting a workbook protect it after I share the password?
It continues to require the password to open, but anyone who knows the password can access the workbook. Share the password separately, limit access to trusted people, and use file-sharing permissions when you need to manage access over time.

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.