To password protect an Excel file on Windows, open your workbook and go to File > Info > Protect Workbook > Encrypt with Password. Enter a password, confirm it, and save the file. Close and reopen the workbook to make sure Excel asks for the password.
On a Mac, supported Excel versions offer a File > Passwords option.
Here’s how to protect your files, restrict editing, and manage existing passwords without losing access to your work.
Quick Answer: How to Lock an Excel File With a Password
Follow these seven steps in Excel for Windows:
- Open the workbook you want to protect.
- Click File in the upper-left corner.
- Select Info.
- Click Protect Workbook.
- Choose Encrypt with Password.
- Enter and confirm your password.
- Save, close, and reopen the file to test it.
This method requires a password before someone can open the encrypted workbook.
Important: Microsoft cannot recover forgotten file passwords. Store yours somewhere secure before closing the workbook.
What Does Password Protection Mean in Excel?
Password protection can serve different purposes depending on the feature you select.
File-level encryption protects a workbook from being opened without the correct password. Other protection options are designed to limit editing rather than prevent access to the contents.
For example, imagine you manage a monthly project budget containing employee payments and confidential financial information.
If you encrypt the file, someone who receives a copy generally cannot view its contents through Excel without entering the correct password.
However, someone who knows the password can open the workbook and may be able to copy, save, or share its contents.
That’s why choosing the appropriate protection method matters.
Method 1: How to Password Protect an Excel File on Windows

Excel for Microsoft 365 and supported desktop versions provide a built-in option for encrypting workbooks.
Step 1: Open Your Excel Workbook
Open the spreadsheet you want to protect.
Before making changes, consider saving a backup copy, especially if the workbook contains important business records or calculations.
Step 2: Go to File > Info
Click the File tab in the upper-left corner of Excel.
Select Info from the navigation menu.
This area contains information about the workbook and options for managing its protection.
Step 3: Select Protect Workbook
Find and click Protect Workbook.
Excel displays several options, which can vary by version.
Remember that the protection options available through the File menu are different from the worksheet controls under the Review tab.
Step 4: Click Encrypt with Password
Choose Encrypt with Password from the dropdown menu.
A password dialog box appears.
This is the option you need when you want Excel to require a password before opening the workbook.
Step 5: Enter a Strong Password
Type your password into the provided field.
Choose something difficult to guess, ideally a long, unique password or passphrase.
Excel passwords are case-sensitive, so uppercase and lowercase letters matter.
Avoid using your name, birthday, or a password already associated with an important online account.
Step 6: Confirm Your Password
Click OK.
Excel asks you to enter the same password again.
Type it carefully and click OK to confirm.
If the entries differ, Excel will not accept the confirmation until they match.
Step 7: Save the Workbook
Press Ctrl + S or use File > Save.
Saving is necessary because entering a password without saving the workbook may leave the saved file unchanged.
Make sure you’re protecting the correct filename and location.
Step 8: Test the Password Protection
Close your workbook completely.
Open the saved file again.
Excel should display a password prompt.
Enter your password to confirm that the workbook opens correctly.
If Excel opens the file without asking for a password, check that you selected Encrypt with Password and saved the intended copy.
Keep your original backup until you’ve successfully verified the protected workbook.
Method 2: How to Password Protect an Excel File on Mac

Excel for Mac also supports password protection, although some menus and compatibility requirements differ from Windows.
In supported versions:
- Open the workbook in Excel for Mac.
- Click File in the menu bar.
- Select Passwords.
- Enter a password in the Password to open field.
- Confirm the password when prompted.
- Save your workbook.
- Close the file and reopen it to test the password.
Some versions also include a separate Password to modify field.
Mac compatibility tip: Password behavior and supported password lengths can differ between Excel releases. If you’re sharing a workbook between Windows and Mac users, test the protected file on the versions your recipients use.
How to Password Protect an Excel File From Editing
Sometimes you want people to open a spreadsheet but don’t want them changing the original file.
Excel offers two different password concepts.
Password to Open
A password to open prevents someone from accessing the encrypted workbook unless they enter the correct password.
Use this option for confidential financial reports, business records, and other files where access itself needs to be restricted.
Password to Modify
A password to modify restricts normal editing or saving changes to the original workbook unless the appropriate password is provided.
Depending on the workbook configuration, someone may still be able to open the file as read-only or save a separate copy.
On supported Excel for Mac versions, this option appears under File > Passwords.
Some desktop Windows versions also provide modification-password settings through the Save As dialog’s General Options.
A modification password is not a substitute for encrypting confidential information.
Password Protect File vs. Protect Sheet vs. Protect Workbook

Excel includes several protection features, but they don’t all perform the same job.
| Protection Feature | Main Purpose | Password Required to Open? |
|---|---|---|
| Encrypt with Password | Restrict access to file contents | Yes |
| Password to Modify | Restrict editing of the original workbook | No, unless separately configured |
| Protect Sheet | Prevent unwanted worksheet edits | No |
| Protect Workbook Structure | Restrict changes to worksheet tabs | No |
| Always Open Read-Only | Encourage or apply read-only handling | No |
Example 1: Confidential Business Budget
Use Encrypt with Password when you want to prevent unauthorized people from opening the file.
Use Protect Sheet when colleagues should enter expenses into certain cells without accidentally changing formulas.
Example 3: Workbook With Standardized Tabs
Use Protect Workbook Structure when users should not rename, delete, or rearrange worksheets.
Example 4: Review-Only Financial Report
A suitable read-only or controlled-sharing arrangement can help limit unwanted changes.
However, simply marking a workbook read-only does not encrypt its contents.
Is Hiding Data the Same as Protecting It?
No.
Hiding a worksheet, column, or row only changes what appears on the screen.
Someone with sufficient access can often reveal that information.
For example, our guide on how to hide rows in Excel explains how hidden data remains stored inside a worksheet.
If a file contains confidential information, hiding rows is not a replacement for encryption. Remove information that recipients should not receive.
How to Protect an Excel Worksheet
Worksheet protection is helpful when you want people to use certain cells without accidentally changing others.
Here’s how it works in supported desktop versions:
- Open the worksheet.
- Select any cells that should remain editable.
- Right-click and choose Format Cells.
- Open the Protection tab and clear Locked for permitted input cells.
- Click Review > Protect Sheet.
- Choose which actions users should be allowed to perform.
- Enter an optional protection password and confirm.
Once protection is enabled, Excel restricts changes to locked cells according to your settings.
Worksheet protection is mainly an editing-control feature, not a secure way to conceal confidential information.
How to Protect Excel Workbook Structure
Workbook structure protection helps prevent unwanted changes to worksheet organization.
To enable it:
- Open your Excel workbook.
- Select the Review tab.
- Click Protect Workbook.
- Confirm that structure protection is selected, where applicable.
- Enter a password if desired.
- Confirm and save the workbook.
Depending on your settings and Excel version, this can restrict actions such as adding, deleting, moving, renaming, hiding, or unhiding worksheet tabs.
It does not require a password to open the entire file.
How to Change a Password on an Excel File
You can replace a known workbook-opening password without recreating your spreadsheet.
For Windows:
- Open the encrypted workbook using its current password.
- Go to File > Info.
- Select Protect Workbook > Encrypt with Password.
- Replace the existing password with a new password.
- Confirm the change.
- Save the workbook.
- Close and reopen it to verify the new password.
On supported Mac versions, open File > Passwords and update the appropriate password field.
Be aware that changing the password on your copy does not automatically change previously distributed copies.
How to Remove Password Protection From an Excel File

You must know the existing opening password to remove encryption through Excel’s normal settings.
Remove a Password on Windows
- Open the protected workbook.
- Enter the current password.
- Click File > Info.
- Select Protect Workbook > Encrypt with Password.
- Delete the password currently shown in the field.
- Click OK.
- Save the workbook.
Close the file and reopen it.
If the opening-password prompt no longer appears, you’ve removed that password from the saved copy.
Remove a Password on Mac
For supported Excel for Mac versions:
- Open the workbook using its existing password.
- Select File > Passwords.
- Clear the Password to open field.
- Confirm the change.
- Save and reopen the workbook.
Removing file encryption means that someone who obtains the unencrypted copy may be able to access its contents without a password.
Can You Password Protect an Excel File Online?
Excel for the web has different protection capabilities from the desktop application.
Microsoft’s documentation explains that file passwords cannot be added, changed, removed, or recovered through Excel for the web.
Some password-protected workbooks can be opened in a browser, but available viewing and editing features depend on the specific workbook and protection configuration.
If you cannot find Encrypt with Password in your browser, open the workbook in a supported desktop version of Excel.
Apply the protection there, save the file, and test it before sharing.
Don’t assume every encrypted workbook can be edited directly through the browser.
How to Create a Strong Excel File Password
A strong password helps reduce the risk of unauthorized access.
Follow these practical recommendations:
- Choose a long, unique password or passphrase.
- Avoid birthdays, names, and predictable patterns.
- Never reuse a password from your email or banking account.
- Use a reputable password manager to store it.
- Keep authorized backup and recovery procedures for important files.
- Test password compatibility when sharing across different Excel versions.
A strong password protects access to an encrypted file, but it cannot prevent an authorized recipient from copying information after opening it.
What Happens If You Forget an Excel Password?
If you forget a file-opening password, Microsoft cannot retrieve it for you.
Before assuming the file is permanently inaccessible, check your available authorized recovery options.
You can:
- Check your password manager.
- Review securely stored password records.
- Ask the workbook owner or authorized administrator.
- Look for an earlier accessible backup.
- Check available file version history.
An older copy may have different password settings, but recovery is not guaranteed.
Avoid uploading sensitive workbooks to unknown password-recovery websites or downloading untrusted tools that claim to unlock every Excel file.
Password protection works best alongside sensible sharing practices.
Before distributing a spreadsheet, review its contents.
For example, a customer workbook might contain repeated records, unnecessary personal details, or information recipients don’t need.
If you need to clean repeated entries first, see our tutorial on how to remove duplicates in Excel. Check your data carefully and keep a backup before deleting records.
Once the workbook is ready:
- Confirm the intended recipient.
- Save and test the encrypted file.
- Send the file through an appropriate approved channel.
- Share its password separately.
- Avoid sending the password in the same email as the attachment.
- Limit the information included in the workbook.
Remember that someone with a valid password may still save or forward the contents.
Changing your original workbook’s password will not automatically revoke access to copies you’ve already shared.
Why Isn’t Excel Password Protection Working?
Several common problems can make Excel password protection confusing.
1. Excel Doesn’t Ask for a Password
You may have protected a worksheet rather than encrypted the whole file.
Check File > Info > Protect Workbook > Encrypt with Password, then save and reopen the correct file.
2. Excel Rejects Your Password
Check uppercase and lowercase letters, your keyboard layout, and accidental spaces.
Excel passwords are case-sensitive.
3. Encrypt with Password Is Missing
You may be working in Excel for the web or using a version with different menu options.
Try opening the workbook in a supported desktop version.
4. The Workbook Opens Without a Password
A modification password or worksheet-protection password does not necessarily prevent people from opening the file.
Make sure you configured a password to open.
5. The Excel File Is Read-Only
The workbook may have modification restrictions, file permissions, or other read-only settings.
Check the relevant settings before changing protection.
6. The Workbook Doesn’t Open on Mac
Check the Excel version, workbook format, and password compatibility.
Older Mac versions may have limitations with some protected files.
7. The Workbook Cannot Be Edited Online
Some protected workbooks have limited browser editing capabilities.
Open the file using desktop Excel if required.
8. The File Appears Corrupted
Corruption is different from an incorrect password.
Check an authorized backup or use Microsoft’s supported file-repair features.
Common Mistakes When Password Protecting Excel Files
Avoid these mistakes:
- Choosing Protect Sheet instead of Encrypt with Password.
- Assuming Protect Workbook Structure prevents file access.
- Using a short or predictable password.
- Forgetting to save the workbook.
- Closing the file without testing the password.
- Storing passwords in unsecured notes.
- Sending the file and password together.
- Assuming hidden rows or columns are private.
- Treating read-only mode as encryption.
- Assuming a password change affects older copies.
- Ignoring Windows and Mac compatibility.
- Believing Microsoft can recover forgotten passwords.
A simple save-and-reopen test prevents many common mistakes.
Frequently Asked Questions
How do I password protect an Excel file?
In Excel for Windows, go to File > Info > Protect Workbook > Encrypt with Password. Enter and confirm your password, then save.
How do I stop people from opening my Excel workbook?
Use file-level encryption with a password to open. Worksheet protection alone will not prevent opening the file.
Does password protection work on Windows 11?
Yes. Supported desktop Excel versions on Windows 11 offer built-in workbook encryption.
How do I password protect Excel on Mac?
In supported versions, select File > Passwords, enter a Password to open, confirm it, and save.
Can I password protect an Excel file online?
Excel for the web does not provide the same file-password management features as desktop Excel.
What does Encrypt with Password mean?
It applies file-level encryption so the workbook requires the correct password to open.
Is Protect Workbook the same as Encrypt with Password?
No. Workbook structure protection restricts changes to worksheet organization, while Encrypt with Password restricts access to file contents.
What is the difference between Protect Sheet and Protect Workbook?
Protect Sheet restricts worksheet editing. Protect Workbook Structure restricts changes to the workbook’s sheet organization.
How do I make an Excel file read-only?
Supported versions offer options such as Always Open Read-Only or separate modification restrictions.
Can I require a password before editing an Excel file?
Yes. Supported desktop Excel versions provide a Password to modify option.
How do I remove a password from Excel?
Open the file using its current password, return to the file password settings, clear the opening password, and save.
How do I change an Excel password?
Open the workbook with the existing password, replace it in the password settings, save, and test the new password.
What if I forget my Excel password?
Check authorized password records, backups, or accessible earlier versions. Microsoft cannot retrieve forgotten file passwords.
Can Microsoft reset an encrypted Excel password?
No. Microsoft does not provide recovery of forgotten file-opening passwords.
How strong should my Excel password be?
Use a long, unique password or passphrase and store it securely. Consider version compatibility when choosing passwords for shared workbooks.
Is a password-protected Excel file completely secure?
No security measure guarantees complete protection. Authorized users can potentially copy or redistribute information.
Can someone copy a password-protected Excel file?
Yes. Encryption restricts opening the file; it does not necessarily prevent a file from being copied or forwarded.
Why is my Excel file not asking for a password?
You may have configured editing restrictions instead of file encryption, forgotten to save, or opened an unprotected copy.
Conclusion
Password protecting an Excel file is straightforward once you choose the correct feature. On Windows, use File > Info > Protect Workbook > Encrypt with Password. On supported Mac versions, use File > Passwords.
Remember that worksheet protection and workbook structure protection serve different purposes. Choose a strong password, store it securely, and reopen the saved file to confirm your protection works before sharing important information.

