To encrypt an Excel spreadsheet in Microsoft Excel for Microsoft 365 on Windows, open the workbook and select File > Info > Protect Workbook > Encrypt with Password. Enter and confirm a strong password, then save the file. Excel will require that password to open the encrypted workbook; sheet protection and workbook-structure protection are different features and do not provide the same security.
What Excel encryption protects
Encrypting a workbook with a password protects the file itself. When someone tries to open the saved workbook, Excel asks for the password before displaying its contents. This is useful for a spreadsheet containing information that should not be readable by anyone who obtains a copy of the file, such as a list of customer details or an internal budget.
Encryption does not control every way the information can be exposed. Once an authorized person opens the file, they can potentially copy its contents, take a screenshot, or save another copy. The password also does not stop someone from deleting or replacing the file. Encryption is one part of protecting information, not a replacement for careful sharing, device security, and backups.
Excel’s Encrypt with Password feature applies to the workbook file. It is not the same as encrypting a disk, a folder, or a cloud account. A copy saved to an unprotected USB drive remains encrypted as a workbook, but a separate unencrypted export or screenshot does not inherit that protection.
How to encrypt a workbook in Excel for Windows
Use the desktop version of Excel for Microsoft 365 on Windows. The command is in the workbook’s Info page, not on the Review tab.
- Open the workbook you want to protect. If it contains sensitive information, check that it is the correct file before proceeding.
- Select File > Info.
- Select Protect Workbook, then choose Encrypt with Password.
- Enter a password in the dialog box and select OK.
- Enter the same password again to confirm it, then select OK.
- Save the workbook. Use Ctrl+S on Windows, or choose File > Save.
Close the workbook and reopen it to confirm that Excel asks for the password. This simple check can catch a missed save or a change made to the wrong copy. Keep the password somewhere secure before closing the file; Excel does not provide a way to reveal a forgotten password.
Excel does not show the password as you type it, so enter it carefully. If you use a password manager, you can generate a long, unique password and store it with a useful label, such as the workbook’s name. Avoid using a password that is already used for email, banking, or another important account.
Excel for Mac and Excel for the web
In Excel for Mac, password options are available from File > Passwords. The dialog lets you set a password to open the workbook; follow its prompts, confirm the password, and save the file. The exact dialog wording can vary by Excel for Mac release. A password to open is the option that encrypts access to the file. A password to modify, if offered, is an editing restriction and should not be treated as equivalent encryption.
Excel for the web does not provide the desktop command for adding or removing a password that encrypts a workbook. If you need to apply or change this password, open the file in the desktop Excel app. A workbook that requires a password to open may also need to be opened in desktop Excel rather than edited in a browser. If the web app cannot open it, download or open it in the desktop app and follow the prompts there.
When moving between Windows and Mac, use a password that both platforms can enter reliably. Avoid unusual characters that may be difficult to type on one keyboard layout, and keep a secure record of the exact password. Do not assume that a cloud-sharing password or a sign-in to Microsoft 365 substitutes for the workbook password.
Choose a strong password and store it safely
The password is the key to the encrypted workbook, so its strength matters. A short or commonly used password may be easier to guess than a long, unique passphrase. A password manager can generate and store a different password for each protected file. If several people need access, share the password through a secure channel rather than putting it in the same email as the workbook.
- Use a long, unique password rather than a name, date, or predictable phrase.
- Do not reuse your Microsoft account password or another important password.
- Limit access to the password to people who genuinely need to open the file.
- Keep a secure backup of the password so the workbook is not lost if its owner is unavailable.
- Review who has access when a project ends or a person no longer needs the file.
There is a practical trade-off: a password that is difficult to guess can also be difficult to recover if it is lost. Decide how the password will be stored and who can retrieve it before encrypting a workbook used by a team. For a critical business file, follow the organization’s approved password-management and records procedures.
Remove or change the password
To remove an open password in Excel for Windows, open the workbook and enter its current password when prompted. Select File > Info > Protect Workbook > Encrypt with Password. Clear the password field so it is blank, select OK, and save the workbook. After saving, close and reopen the file to verify that it no longer asks for a password.
To change the password, use the same command, replace the existing password with a new one, confirm it, and save. You must know the current password to open the workbook before making this change. On Mac, use File > Passwords and update or clear the password-to-open field, then save the file. Menu details can differ by release.
Removing the password makes the saved workbook easier to open, so first consider whether the file will be shared or stored somewhere less controlled. If you need to keep an unencrypted working copy, store it only where its access is appropriate and clearly distinguish it from the protected version.
Encryption versus sheet and workbook protection
Excel has several features called protection, and their names can be confusing. Encrypt with Password requires a password to open the file. Protect Sheet can limit actions such as editing locked cells on a worksheet. Protect Workbook can restrict changes to workbook structure, such as adding, moving, or deleting sheets. Those worksheet and structure controls are meant to prevent particular edits; they do not make the contents unreadable to someone who can open the workbook.
For example, hiding a worksheet and protecting the workbook structure may discourage accidental changes, but it is not a substitute for file encryption when the data must be confidential. Similarly, setting a password to modify may deter casual editing, but it should not be confused with the password-to-open encryption setting. Choose the feature based on the goal: confidentiality, preventing accidental edits, or controlling structural changes.
Sharing, cloud storage, and copies
Encrypting a workbook is useful when sending or carrying a file, but think through how the recipient will receive both the file and the password. Sending them together in one message reduces the benefit if that message or account is compromised. A separate, trusted channel is safer. Confirm that intended recipients can open the file with the Excel version and device they use.
Cloud services such as OneDrive can provide account-based sharing controls, such as choosing who can access a file. Those controls are different from a workbook password. A share link may be easier to revoke or manage for collaboration, while a password-encrypted workbook can protect a downloaded copy. Depending on the service and organization settings, both approaches may be used together, but neither makes careless sharing safe.
Encryption applies to the protected workbook, not automatically to every version of its data. Watch for exported CSV files, email attachments, temporary downloads, older backups, and duplicate copies. A CSV file does not preserve Excel workbook features such as sheets, formulas, or workbook password encryption. If a recipient needs a CSV, treat that export as a separate file with its own handling and access controls.
Common problems and limitations
- The password is forgotten. Microsoft does not provide a back door that reveals the password. If you cannot open the workbook, check an approved password manager or secure record. Do not rely on being able to recover it later.
- The file opens without asking. Check that you encrypted the copy you are opening, then save and reopen it. A similarly named file or an unsaved change can cause confusion.
- A recipient cannot open the file in a browser. Ask them to use desktop Excel and enter the password. Browser support for password-encrypted workbooks is limited.
- The file is an older format. Legacy Excel formats and older software can behave differently. If you convert a workbook, retain a backup and test the converted copy before relying on it.
- Someone can still edit a sheet. That is a separate issue from opening the encrypted file. Use worksheet protection if you want to limit editing, but do not treat it as a confidentiality control.
Compatibility is worth checking before distributing a protected workbook broadly. If recipients use older Excel versions or non-Microsoft spreadsheet software, test a non-sensitive copy first. Avoid weakening protection on the only copy just to troubleshoot; make a backup and keep the original secure.
When to use another security approach
For a file that only a small number of people need to open, a strong workbook password can be straightforward. For a team that collaborates frequently, managed access through a cloud service or an organization’s document-management system may be easier to administer. Administrators can often manage permissions centrally, which is useful when people join or leave a project.
For highly sensitive information, follow the rules set by your employer, school, or organization. It may require approved storage, restricted sharing, data-loss prevention controls, or a particular encryption method. Do not put secrets in a workbook merely because it has a password; collect only the data needed and limit who receives it. A password on one file cannot compensate for an insecure computer, compromised account, or broadly shared link.
Frequently Asked Questions
Can I encrypt an Excel file without opening it? No. In the usual Excel workflow, open the workbook in the desktop app, set the password-to-open option, and save the file. If you cannot open it because it already has a password, you need the correct password before you can change its settings.
Does protecting a worksheet encrypt the data? No. Worksheet protection restricts selected editing actions; it does not require a password to read the workbook’s contents. Use File > Info > Protect Workbook > Encrypt with Password in Excel for Windows when you need a password to open the file.
Can Microsoft recover a forgotten Excel password? Microsoft does not provide a recovery mechanism that reveals a forgotten password for an encrypted workbook. Check your password manager or secure records. Keeping a controlled backup of the password before it is needed is important.
Can I password-protect an Excel spreadsheet online? Excel for the web does not offer the desktop command to set or remove a password that encrypts a workbook. Open the file in desktop Excel for Windows or Mac and use its password settings.
Does a password protect every copy of my spreadsheet? It protects the encrypted workbook file, not every export, screenshot, or duplicate someone may create after opening it. Review where copies are saved and apply appropriate sharing and storage controls to each separate file.
Related
- Discounted Cash Flow Model Excel Template Explained
- Discounted Cash Flow Excel Template: Build and Use One
- CSV vs Excel: Key Differences and When to Use Each
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- JavaScript split() Explained: Strings, Limits, and ExamplesIn JavaScript, split() is a string method that divides a string wherever a specified separator occurs and returns…
- Billing Invoice Template Excel: Setup and Key DetailsA billing invoice template in Excel is a reusable workbook for listing goods or services, calculating charges, and…
- Hide and Password-Protect Columns in ExcelTo hide a column in Excel for Microsoft 365 on Windows, select its letter, then choose Home >…
- How to Share a Resource Calendar in Microsoft OutlookTo share a room or equipment calendar in Outlook, open the calendar’s sharing or permissions controls, add the…
- Excel: Make Rows Collapsible with Grouping and OutlinesYes. In Excel for Microsoft 365 on Windows, select the rows you want to fold away, then choose…
- How to Open Excel in a Browser and Edit Your FilesTo open Excel in a browser, go to microsoft365.com, sign in with a Microsoft account, and select Excel.…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.