How to Password Protect an Excel File (Windows & Mac)
Adam Smart
Office Guides
8 minute read
Updated and reviewed by Adam Smart, Ecokeys Support Engineer — 2 September 2026
The quickest method on Windows: open the Excel file and go to File > Info > Protect Workbook > Encrypt with Password. Enter the password twice, then save the workbook.
This prevents somebody from opening the Excel file without the password. It is different from protecting a worksheet or locking the structure of a workbook.

How to Password Protect an Excel File on Windows
If you want to stop somebody opening an Excel file unless they know the password, use Excel’s Encrypt with Password option.
- Open the Excel workbook you want to protect.
- Select File.
- Select Info.
- Select Protect Workbook.
- Choose Encrypt with Password.
- Enter the password you want to use and select OK.
- Enter the same password again when Excel asks you to confirm it.
- Save the workbook.
Important: Microsoft cannot retrieve a forgotten Excel file password for you. Store the password somewhere secure before relying on it to protect an important workbook.
Close Excel and reopen the file if you want to test the protection. Excel should ask for the password before displaying the workbook contents.
Excel File Password vs Workbook vs Worksheet Protection
Excel has several options containing the word Protect, but they do different jobs. This is where many guides become confusing.
Encrypt the Excel file
Purpose: prevent somebody opening the file without the password.
Windows: File > Info > Protect Workbook > Encrypt with Password.
Protect the workbook structure
Purpose: stop users adding, deleting, moving, hiding or renaming worksheets.
This does not provide the same protection as encrypting the whole Excel file.
Protect a worksheet
Purpose: prevent users changing particular cells, formulas or parts of a worksheet.
Worksheet protection is mainly designed to prevent unwanted changes rather than secure confidential information.
If your goal is privacy: use file-level encryption. If your goal is to stop somebody accidentally changing formulas or worksheets, use worksheet or workbook protection instead.
How to Password Protect an Excel File on Mac
Excel for Mac also allows you to require a password before a workbook can be opened or modified.
- Open the workbook in Excel for Mac.
- Open the File menu.
- Select Passwords.
- Enter a password in the option for opening the file.
- If required, you can also set a separate password for modifying the workbook.
- Confirm the password and save the workbook.
Menu wording can vary slightly between Excel versions, but the important distinction is whether you are setting a password to open the file or merely protecting the workbook or worksheet from changes.
How to Remove a Password From an Excel File
You must know the existing password before removing file protection.
Windows
- Open the protected workbook and enter its current password.
- Go to File > Info > Protect Workbook > Encrypt with Password.
- Delete the password from the password box.
- Select OK.
- Save the workbook.
The next time the file is opened, it should no longer request that password.
Mac
Open the workbook using the current password, return to the password protection settings and remove or change the existing password before saving the workbook again.
How to Change an Excel File Password
To change a password, first open the workbook using the existing password. Return to the same password settings, replace the old password with the new one and save the file.
You do not need to change an Excel password every month simply because time has passed. Change it when there is a sensible security reason — for example, if the password may have been disclosed, somebody should no longer have access, or your organisation’s security policy requires a change.
How to Protect an Excel Worksheet From Changes
If you do not need to hide the workbook contents but want to stop somebody accidentally editing formulas or important cells, worksheet protection is usually more appropriate.
In Excel for Windows:
- Open the worksheet.
- Select the Review tab.
- Select Protect Sheet.
- Choose which actions users should still be allowed to perform.
- Enter a password if required.
- Confirm the password.
Worksheet protection is not the same as file encryption. Microsoft describes worksheet protection as a way to control changes to locked cells, not as a security feature for protecting confidential data.
How to Protect the Structure of an Excel Workbook
Workbook structure protection is useful when a workbook contains several worksheets and you do not want users adding, deleting, moving, hiding or renaming those sheets.
- Open the workbook.
- Select the Review tab.
- Select Protect Workbook.
- Enter a password if you want to prevent somebody easily removing the protection.
- Confirm the password.
This protects the structure of the workbook. It does not replace file-level encryption when you need to prevent unauthorised users opening the file.
Can You Password Protect a File in Excel for the Web?
If you are working in Excel through a web browser, use the desktop Excel application when you need to add or change password protection.
A OneDrive or SharePoint sharing link can also have its own sharing and access controls, depending on the account and plan being used. Those controls are separate from encrypting the actual Excel file with a password.
Do not confuse the two: controlling who can access a OneDrive sharing link is not the same as encrypting an Excel workbook with a file password.
Choosing and Storing an Excel Password
Password protection is only useful if the password itself is handled securely.
- Use a password that is difficult for somebody else to guess.
- Avoid names, birthdays and obvious company information.
- Remember that Excel passwords are case-sensitive.
- Store important passwords securely rather than relying on memory alone.
- Do not send the workbook and its password together in the same message when the contents are particularly sensitive.
- Only share the password with people who genuinely need access.
Does Password Protecting Excel Make the File Completely Secure?
No security measure should be treated as absolute. File encryption helps prevent someone opening the workbook without the password, but anybody who is legitimately given the password can access the file and may be able to create another copy.
For highly sensitive business or personal information, password protection should be used alongside sensible account security, access permissions, secure sharing and appropriate backups.
What Happens if You Forget an Excel Password?
If you forget the password used to encrypt an Excel file, Microsoft does not provide a recovery service that can retrieve it for you.
This is why the password should be stored securely before encrypting an important workbook.
Avoid downloading unknown “Excel password recovery” programs. Software claiming to bypass document security can be unsafe, and uploading confidential workbooks to unknown recovery websites can expose the very data you were trying to protect.
Frequently Asked Questions
How do I put a password on an Excel file?
In Excel for Windows, open the workbook and select File > Info > Protect Workbook > Encrypt with Password. Enter the password, confirm it and save the file.
Can I password protect an Excel file so nobody can open it?
Yes. Use file-level password encryption rather than worksheet protection. The person opening the workbook will then need the correct password before Excel displays its contents.
Is Protect Workbook the same as encrypting an Excel file?
No. The wording can be confusing. The Encrypt with Password option under Protect Workbook controls access to the file, while workbook structure protection controls actions such as adding, moving, deleting or renaming worksheets.
Can I password protect only one worksheet?
You can protect an individual worksheet and control which cells users may edit. However, Microsoft does not treat worksheet protection as the same kind of security as encrypting the entire file.
Can Microsoft recover a forgotten Excel password?
No. Microsoft states that it cannot retrieve forgotten passwords, so keep the password in a secure place.
How do I remove a password from an Excel workbook?
Open the workbook using the existing password, return to the password protection settings, clear the password and save the workbook again.
Does password protecting a worksheet stop somebody reading the file?
No. Worksheet protection is primarily intended to control editing. To require a password before somebody can open and read the workbook, use file-level encryption.
Need Microsoft Excel for your Windows PC?
Excel is included with Microsoft Office editions such as Office 2024. You can compare Microsoft Office 2024 editions to see which applications are included.
Related Articles
Unlock the Power of Your Data with Microsoft Access
7 minute read