The fastest way to lock your spreadsheet

To password protect an Excel file, open the document, go to File > Info > Protect Workbook > Encrypt with Password, type your password twice, and save. The file will not open without that password. On a Mac, the path is File > Properties > Security > Encrypt Document.

This method encrypts the entire file, meaning anyone who tries to open it will see a password prompt before they can view any content. It takes about 30 seconds and requires no additional software.

Key Takeaways

  • Excel's built-in encryption locks the whole file and requires a password to open it at all — this is different from protecting just the sheet or cells.
  • Windows and Mac have slightly different menu paths, but both use the same Encrypt with Password feature in the File menu.
  • If you forget the password, there is no recovery method — Excel cannot retrieve it for you, so write it down somewhere safe.
  • A password-protected Excel file still works normally once opened; the protection only affects who can open it in the first place.

Step-by-step for Windows

Open the Excel file you want to protect. Click the File tab in the top left corner. From the menu on the left, select Info. On the right side of the screen, you will see a button labeled Protect Workbook with a dropdown arrow next to it. Click that arrow.

Select Encrypt with Password from the dropdown menu. A dialog box will appear asking you to enter a password. Type your password in the field — it will show as dots for security. Click OK. Excel will ask you to enter the password again to confirm you typed it correctly. Type it a second time and click OK. Save the file using Ctrl+S or File > Save. The password is now active.

Step-by-step for Mac

Open the Excel file. Click File in the menu bar at the top. Scroll down and select Properties. A new window will open. Click the Security tab at the top of that window. You will see a checkbox labeled Encrypt Document. Check that box.

A password dialog will appear. Enter your password and click OK. Excel will ask you to type it again to confirm. Type it a second time and click OK. Close the Properties window and save your file. The password protection is now in place.

What happens when someone tries to open your file

When a password-protected Excel file is opened, the person opening it will see a password prompt before the spreadsheet appears. They must type the correct password to proceed. If they enter the wrong password, they cannot open the file — they will straightforward see the prompt again.

This protection applies to the entire file. There is no way to view any part of the spreadsheet without entering the password first. Once the file is open, the person can edit, copy, or print the contents normally — the password only guards the entry point.

Passwords that actually work

A strong password for an Excel file should be at least 8 characters long and mix uppercase letters, lowercase letters, numbers, and symbols. For example: Budget2024!Q3 or HomeData#Secure7. Avoid using dictionary words, birthdays, or names that someone who knows you might guess.

Write your password down and store it somewhere separate from the file — not in a note on the same computer or in an email. If you forget it, Excel has no way to recover it. You will not be able to open the file. There is no "forgot password" button or recovery process.

The difference between file encryption and sheet protection

Password protecting the entire file (what this article covers) is different from protecting individual sheets or cells within an open file. File encryption locks people out completely. Sheet protection lets someone open the file but prevents them from editing certain cells or sheets — they can still see the data.

If you want people to be able to view your spreadsheet but not change it, sheet protection is the right tool. If you want to keep the data hidden from view entirely, file encryption is what you need. Most people protecting sensitive home documents — mortgage information, tax records, insurance details — want file encryption.

When to use this and when not to

File encryption works well for documents you store on your own computer or a local drive. It is useful for tax returns, financial records, medical information, or any spreadsheet with personal details. It also works if you email the file to someone — they will need the password to open it on their end.

File encryption does not protect data if someone gains access to your computer itself. If someone can log into your Windows or Mac account, they can potentially recover or bypass the password through other means. For truly sensitive information, keep the file on an external drive stored in a safe place, or consider whether it needs to be in Excel at all.

Frequently Asked Questions

Can I change the password after I set it?

Yes. Open the file, enter the current password, then go to File > Info > Protect Workbook > Encrypt with Password again. Excel will ask for the old password first, then let you enter a new one. Save the file when done.

What if I share the file with someone and want to remove the password later?

Open the file with the password, go to File > Info > Protect Workbook > Encrypt with Password, and leave the password field blank when prompted. Click OK twice and save. The file will no longer require a password.

Does password protecting an Excel file slow it down?

No. The file opens and runs at the same speed whether it is password protected or not. The only difference is the password prompt that appears before it opens.

Can I password protect an Excel file on my phone or tablet?

The mobile versions of Excel (on iPhone, iPad, or Android) do not have the built-in encryption feature. You will need to use the desktop version of Excel on Windows or Mac to set up file encryption. Once encrypted, you can open it on your phone, but you will need to enter the password first.

Is Excel password protection the same as OneDrive or Google Drive encryption?

No. Excel's password protection encrypts the file itself. OneDrive and Google Drive have their own security layers, but they are separate from the file encryption. If you upload a password-protected Excel file to OneDrive, it stays password protected — the cloud storage does not remove that protection.