
A password on an Excel file can mean two very different things. Encryption stops anyone without the password from opening the file at all. Protection only stops people from changing parts of it – and can be removed far more easily. This guide shows how to set both in Excel for Windows and Mac, what works in Excel for the web, how to remove a password again, and which option actually keeps your data private.
The short answer
- To lock the whole file on Windows: File → Info → Protect Workbook → Encrypt with Password. On a Mac: File → Passwords → Password to open.
- Current Excel versions encrypt the file with 256-bit AES. That applies to Excel 2019, 2021, 2024 and Microsoft 365.
- Protect Sheet und Protect Workbook on the Review tab only prevent accidental changes. Microsoft says sheet protection is not a security feature.
- Excel for the web cannot add a password to open, and it cannot open encrypted workbooks. You need the desktop app.
- If you forget the password, Microsoft cannot recover it. Keep it in a password manager.
The four kinds of Excel password protection
| Protection | What it does | Where to find it (Windows) | Keeps data private? |
|---|---|---|---|
| Password to open (encryption) | Nobody can open the file without the password. The contents are encrypted. | File → Info → Protect Workbook → Encrypt with Password | Yes |
| Password to modify | Anyone can open the file read-only. Only people with the password can save changes to it. | File → Save As → Tools → General Options | No – it stops edits, not reading |
| Protect Workbook (structure) | Stops others from adding, moving, deleting, hiding or renaming sheets. | Review → Protect Workbook | No |
| Protect Sheet | Stops changes to locked cells. You choose what others may still do, such as sorting or filtering. | Review → Protect Sheet | No |
Rule of thumb: if the file contains anything confidential – salaries, customer lists, bank details, health data – use a password to open. The other three options are for keeping templates and reports intact.
How to password protect an Excel file on Windows
- Open the workbook and select File → Info.
- Select Protect Workbook and choose Encrypt with Password.
- Enter a password and select OK.
- Enter the password again under Reenter Password and select OK.
- Save the workbook. From now on, Excel asks for the password every time the file is opened.
Passwords are case-sensitive. These steps work the same in Excel for Microsoft 365, Excel 2024, Excel 2021 and Excel 2019.
Set a password to modify instead
Use this when everyone may read the file, but only you should change it:
- Select File → Save As, then Browse or More options to open the classic save dialog.
- Select Tools → General Options next to the Save button.
- Enter a password under Password to modify. You can also set a Password to open here, or tick Read-only recommended.
- Select OK, confirm the password and save.
How to password protect an Excel file on a Mac
- Open the workbook in Excel for Mac.
- Select File → Passwords.
- Enter a password under Password to open. If you also want to stop changes, add a Password to modify.
- Select OK and enter the password again to confirm.
- Save the workbook.
Sheet and workbook protection work as on Windows: Review → Protect Sheet or Review → Protect Workbook.
Can you password protect an Excel file in Excel for the web?
No. Excel for the web has no option to add a password to open, and it cannot open workbooks that are encrypted with a password. You have to download such a file and open it in the desktop app.
What you can do online is control who gets access. In OneDrive or SharePoint, share the file with Can view instead of Can edit. With a Microsoft 365 subscription, OneDrive sharing links can also get an expiry date and a password.
How to protect a sheet or the workbook structure
Protect a sheet but leave some cells editable:
- Select the cells others may still fill in, right-click them and choose Format Cells → Protection. Untick Locked.
- Select Review → Protect Sheet.
- Choose what others may still do, for example select cells, sort or use AutoFilter.
- Enter a password if you want one, select OK and confirm it.
Protect the workbook structure: select Review → Protect Workbook, enter a password and confirm it. Microsoft points out that the password is optional, but without one anybody can remove the protection.
Both are useful for templates, budgets and forms that several people fill in. They are not a way to keep data confidential.
How to remove a password from an Excel file
You need to know the current password for all of these steps:
- Password to open on Windows: open the file, select File → Info → Protect Workbook → Encrypt with Password, delete the password, select OK and save.
- Password to modify on Windows: open File → Save As → Tools → General Options, clear the field and save.
- On a Mac: open File → Passwords, clear the fields, select OK and save.
- Sheet or workbook protection: select Review → Unprotect Sheet or Review → Protect Workbook and enter the password.
If the password to open is lost, Microsoft cannot recover it. That is exactly what makes encryption useful – and why the password belongs in a password manager.
Five tips for passwords and sharing
- Use a long passphrase. Four or more random words are easier to remember and much harder to guess than a short password. A password manager can create and store it.
- Send the password separately. Never put the password in the same email as the file. Share it by text message or phone instead.
- Know the trade-off with the cloud. Encrypted workbooks cannot be opened in Excel for the web, so AutoSave and real-time co-authoring in OneDrive or SharePoint do not work with them. For files a team edits together, control access with sharing permissions instead – or with sensitivity labels, which some Microsoft 365 business plans include.
- Do not rely on sheet protection for secrets. It keeps formulas safe from accidental edits, nothing more.
- Keep Excel up to date. Current versions use stronger encryption than very old releases. If you still use Excel 2010 or 2013, it is time to upgrade.
Want Excel to do more of the work as well? Try our 12 AI prompts for Excel for formulas, data cleaning and summaries.
Need desktop Excel?
Password encryption needs the desktop version of Excel. Office 2024 includes the full Excel for Windows or Mac with a one-time purchase – no subscription. TheUnitySoft delivers genuine licences by email straight after payment.
Office 2024 Professional Plus → · Office 2024 Standard → · Office for Mac →
Weighing a one-time licence against a subscription? Our comparison of Office 2024 vs Microsoft 365 helps you decide.
Häufig gestellte Fragen
How do I password protect an Excel file?
On Windows, select File → Info → Protect Workbook → Encrypt with Password, enter and confirm a password, then save. On a Mac, select File → Passwords, enter a password to open, confirm it and save.
Is Excel password protection secure?
A password to open is secure if the password is strong: current Excel versions encrypt the file with 256-bit AES. Sheet and workbook protection are not security features. They only prevent accidental changes.
Can I password protect an Excel file without Microsoft 365?
Yes. Encrypt with Password is part of desktop Excel in the one-time versions too, including Office 2024 and Office 2021. Only Excel for the web lacks the feature.
What happens if I forget the password?
Microsoft cannot retrieve forgotten passwords, so you cannot open an encrypted file without it. Store passwords for important files in a password manager.
Can I lock only certain cells in Excel?
Yes. Unlock the cells that should stay editable under Format Cells → Protection, then turn on Review → Protect Sheet. All other cells are then locked.
Why does AutoSave not work with my password-protected workbook?
Encrypted workbooks cannot be opened by Excel for the web, so AutoSave and co-authoring in OneDrive or SharePoint are not available for them. Save changes manually, or remove the encryption if the file does not need it.
Sources: Microsoft Support – Protect an Excel file, Microsoft Support – Protection and security in Excel, Microsoft Support – Protect a workbook, Microsoft Support – Require a password to open or modify a workbook, Wikipedia – Microsoft Office password protection. Last updated: 14 October 2026.


