To encrypt an Excel file in Microsoft 365 for Windows, open it and select File > Info > Protect Workbook > Encrypt with Password. Enter a password, confirm it, then save the workbook; Excel will require that password to open the encrypted file.
What password encryption does
Encrypt with Password protects the workbook at the file level. Someone who does not know the password cannot normally open the workbook and read its contents in Excel. This is the option to use when a workbook contains information you want to keep confidential, such as a staff list, customer details, or an internal forecast.
Encryption is different from asking people not to edit particular cells. Once an authorized person opens the file, its contents are available to that person, and they can potentially copy, photograph, or share the information. Encryption also cannot protect an already-open workbook from someone using the same unlocked computer. It is a barrier to unauthorized file access, not a substitute for careful handling of sensitive information.
Do not confuse file encryption with Protect Sheet or Protect Workbook features that limit editing. Sheet protection can help prevent accidental changes to formulas or layout, but it is not designed to keep the worksheet’s contents secret. Likewise, protecting the workbook structure can restrict actions such as adding or moving sheets without encrypting the file for opening.
Encrypt a workbook in Excel for Windows
- Open the workbook in the desktop version of Excel and save it in a suitable Excel format, such as .xlsx or .xlsm.
- Select File > Info.
- Select Protect Workbook, then choose Encrypt with Password.
- Type a password in the prompt and select OK. Excel asks you to type it again to confirm.
- Save the workbook. Close it and, if practical, reopen it to confirm that Excel requests the password.
The password is case-sensitive. Excel does not show it again in the workbook settings, so make sure you have recorded it securely before closing the file. If Excel asks whether to replace or save changes after you set the password, complete the save; the protection is not reliably applied to a separate copy that you never saved.
To remove the opening password later, open the workbook with the current password, return to File > Info > Protect Workbook > Encrypt with Password, delete the characters in the password box so it is blank, select OK, and save. Removing the password means anyone with access to the file may be able to open it.
Password to open versus password to modify
Excel can offer more than one kind of password protection, and the distinction matters. A password to open encrypts the file so that a person must supply the password to view its contents. A password to modify is intended to control editing: depending on the dialog and Excel version, a recipient may be able to open a read-only copy without the editing password. That second option is not a confidentiality measure.
If the goal is to keep data private, choose the file-encryption option that requires a password to open. If the goal is simply to reduce unintended edits, read-only access, sheet protection, or workbook-structure protection may be more appropriate. These controls solve different problems and can be combined, but adding several kinds of protection does not make a weak opening password strong.
Excel for Mac and Excel for the web
In Excel for Microsoft 365 on Mac, the password controls are available in the desktop app, but the route can differ from Windows. Look under File > Passwords to set a password to open or modify. Depending on the Mac release, protection controls may also appear on the Review tab. If the menu labels differ, check that you are using the desktop app and consult the help for that version rather than assuming sheet protection encrypts the whole file.
Excel for the web does not provide the same controls for setting, changing, or removing an opening password. Open the workbook in the desktop Excel app to apply file encryption. A password-protected file may also be less convenient to preview or work with in browser-based services and other spreadsheet applications. If a collaborator cannot open it in the web app, give them access to the password-protected file and have them open it in a compatible desktop version, or agree on another secure sharing method.
Choose and store a strong password
Use a password that is long, unique, and not used for your email, Microsoft account, or another important service. A memorable passphrase made from several unrelated words can be easier to store accurately than a short string with predictable substitutions. Avoid information someone could guess from the workbook or its owner, such as a company name, birthday, project name, or the word password followed by a year.
A password manager is a practical place to store the password alongside the workbook’s name and purpose. If several authorized people need access, share the password through an approved password manager or another separate, protected channel. Sending the file and its password in the same unprotected email or chat means that one compromised message may expose both.
Consider who needs access before setting the password. A team workbook encrypted with a password known only to its creator can become inaccessible when that person is unavailable. For work files, follow the organization’s approved storage, access-control, and password-sharing procedures. A shared password is also harder to revoke for one person: if access must be withdrawn, you may need to change the password and distribute the new one to everyone who still needs it.
What encryption does not protect
Encryption protects the saved file while it is closed, but it does not control every copy or route by which its information can travel. A recipient who knows the password can save another copy, take screenshots, or transfer data into a different document. A workbook may also exist in email attachments, downloads, synced folders, backups, or version history. Apply appropriate permissions and retention rules to those locations as well.
When a workbook is stored in OneDrive or SharePoint, use the service’s sharing permissions to limit who can access the file, and use Excel’s opening password when you need an additional file-level barrier. The two controls are not interchangeable: a password does not determine which account can access a cloud link, while link permissions do not necessarily encrypt a downloaded copy with an Excel password. Follow your organization’s policy for sensitive data and avoid placing a confidential workbook in a broadly accessible folder.
Once an authorized user opens the workbook, the password cannot prevent that user’s device from being compromised or the data from being copied. Keep computers and accounts protected, lock your screen when away, and do not leave an unlocked workbook visible to people who should not see it. For regulated or highly sensitive material, use the access and information-protection tools approved by your organization rather than relying on a spreadsheet password alone.
Common problems and recovery limits
The most consequential problem is forgetting the password. Excel does not provide a normal password-reset route that decrypts a file without the existing password, and Microsoft cannot retrieve a forgotten workbook password for you. Keep a verified record before relying on the file. If the password has been lost, check authorized password-manager entries, secure team records, and legitimate backups or earlier copies. Do not assume that renaming the file or changing its extension will remove encryption.
Be careful when using third-party recovery software or online unlocking websites. Uploading a confidential workbook can disclose its contents or metadata, and software that claims to recover a password may not succeed. A weak password may be vulnerable to guessing, but that is not a dependable recovery plan. Never upload sensitive work data to a service unless your organization has approved it.
If Excel does not prompt for a password after you set one, check that you used Encrypt with Password rather than a sheet-protection command, and confirm that you saved the correct file. Make sure you are reopening the encrypted copy, not an earlier attachment or a duplicate in another folder. If a recipient reports that the password fails, check capitalization, keyboard layout, accidental leading or trailing spaces, and whether they received the current password rather than an old one.
Alternatives and choosing the right protection
Choose protection based on the risk and the task, not just on the word protect in a menu. Common options include:
- Password to open: encrypts the workbook file and is appropriate when the contents should not be readable without the password.
- Sheet or structure protection: helps restrict editing or changes to workbook layout, but is not a way to hide confidential data from someone who can open the file.
- Cloud sharing permissions: let an owner manage access to a OneDrive or SharePoint file and can be easier to revoke or adjust for individual accounts.
- An approved secure-sharing or information-protection service: may provide organization-managed access rules, auditing, or expiration controls when those features are needed and available.
For example, if you are sending a budget workbook to one authorized reviewer and want to prevent anyone else from opening a downloaded copy, use an opening password and deliver the password separately. If coworkers only need to view a shared cloud file, account-based read access may be easier to administer than distributing a common password. If the aim is to prevent accidental formula edits, protect the relevant sheet instead of treating encryption as an editing control.
Frequently Asked Questions
Can I password-protect an Excel file without encrypting it?
Yes. Excel has sheet and workbook-structure protection intended to limit editing or structural changes. Those features do not provide the same confidentiality as a password required to open an encrypted workbook.
Can I open a password-protected workbook in Excel for the web?
Web support is limited compared with the desktop app, and Excel for the web cannot set or remove the file-opening password. If the workbook will not open or work as expected in the browser, use the desktop Excel app and follow your organization’s sharing rules.
What if I forgot the Excel password?
Excel has no built-in way to reset a forgotten opening password while preserving access to the encrypted contents, and Microsoft cannot retrieve it. Check secure records and backups; be cautious about recovery tools, especially online services that require you to upload the file.
Does Protect Sheet keep other people from reading my data?
No. Sheet protection is aimed at restricting changes, not hiding worksheet contents from someone who can open the workbook. Use Encrypt with Password when the file itself must require a password to open.
Can I remove the password after encrypting the workbook?
Yes, if you can open the workbook with its current password. Clear the password in the same encryption settings, confirm the change, and save the file. The resulting unencrypted workbook can be opened without that password, so store or share it accordingly.
Related
- Excel Forecast Sheet: Does It Use AI and How It Works
- Dock Audit Format in Excel: Build a Practical Checklist
- Dock Audit Checklist in Excel: What to Include
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Compare Two Columns in Different Sheets: MethodsTo compare values in two different worksheets, use COUNTIF to check whether each value on the first sheet…
- Excel Power Query Merge vs Append: Which Should You Use?In Excel Power Query, Merge joins two queries side by side using one or more matching columns; Append…
- Excel Data Validation List: Keep Dropdowns in A-to-Z OrderExcel data-validation dropdowns are not alphabetized automatically: sort the cells that supply the list A to Z, then…
- Excel Vertical Page Breaks: How to Add and Adjust ThemAn Excel vertical page break marks where printed columns split from one page to the next. In Excel…
- Google Sheets Shortcut Keys for Faster Everyday WorkGoogle Sheets shortcut keys let you edit, format, navigate, and manage a spreadsheet without reaching for menus. In…
- Data Cleaning Shortcuts in Excel: A Practical GuideFor quick data cleaning in Excel for Microsoft 365 on Windows, turn the range into a table with…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.