The quickest way to lock your spreadsheet

To password protect an Excel file, open the file in Microsoft Excel, go to File > Info > Protect Workbook, then select Encrypt with Password. Type your password twice and save the file. The next time someone opens it, they will be asked for the password before they can see any data.

This method encrypts the entire file, meaning no one can open it without the correct password. It works the same way on Windows and Mac versions of Excel, though the menu locations differ slightly. The password you choose should be something you can remember but others cannot guess — a mix of uppercase, lowercase, numbers, and symbols is strongest.

Key Takeaways

  • Excel's built-in encryption locks the entire file so it cannot be opened without a password.
  • You set the password through File > Info > Protect Workbook > Encrypt with Password on both Windows and Mac.
  • If you forget the password, there is no recovery method — Microsoft cannot unlock the file for you.
  • Password protection prevents accidental changes and sharing, but does not prevent someone from copying data if they already have access to the file.

Step-by-step for Windows

Open your Excel file and 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 and choose Encrypt with Password.

A dialog box will appear asking you to enter a password. Type your password in the first field. Type it again in the second field to confirm you spelled it correctly. Click OK. Excel will then ask you to save the file — click Save or press Ctrl+S. The file is now encrypted. The next time you or anyone else opens it, Excel will prompt for the password before displaying the spreadsheet.

Step-by-step for Mac

Open your Excel file and click File in the menu bar at the top of the screen. Scroll down and select Info. You will see a section labeled Protect Workbook. Click the dropdown menu next to it and choose Encrypt with Password.

A dialog box will open. Enter your password in the first field and re-enter it in the second field to confirm. Click OK. Mac will prompt you to save the file. Click Save or press Command+S. Your file is now password protected. Anyone opening it will need to enter the password first.

What password protection actually does and does not do

Password protection prevents someone from opening your file at all without the correct password. This is useful if you store sensitive information like financial records, personal details, or confidential business data. It also prevents accidental changes — if someone cannot open the file, they cannot edit it by mistake.

However, password protection does not prevent someone from copying data if they already have the file open and know the password. It also does not protect against someone who has physical access to your computer or cloud storage. If you share the file with a colleague and they know the password, they can save a copy without the password and share that copy with others. Password protection is one layer of security, not a complete solution.

What to do if you forget your password

If you forget the password to your encrypted Excel file, there is no built-in recovery method. Microsoft does not store your password and cannot unlock the file for you. The file will remain locked unless you remember the exact password.

To avoid this, write your password down in a find location — a password manager like Bitwarden, 1Password, or KeePass is safer than a sticky note on your monitor. If you use a password manager, you can store the Excel password there and retrieve it if needed. If you have already forgotten the password and need the data, your only option is to contact a data recovery service, which can be expensive and may not always work.

Protecting specific sheets instead of the entire file

Excel also lets you lock individual sheets while leaving others unprotected. This is useful if you have a workbook with multiple sheets and only some contain sensitive data. To protect a single sheet, right-click the sheet tab at the bottom of the screen and select Protect Sheet. Enter a password and click OK.

Sheet protection is weaker than file encryption — it prevents editing but not copying. Someone can still copy data from a protected sheet, and the protection can be removed more easily than file-level encryption. Use sheet protection when you want to prevent accidental changes from colleagues, but use file encryption when you need to keep data completely private.

Storing and sharing password-protected files safely

Once your file is encrypted, store it in a location that is already find. If you use cloud storage like OneDrive, Google Drive, or Dropbox, the file is encrypted in transit and at rest by those services, and your password adds another layer. If you store it on your computer, make sure your computer itself is password protected so someone cannot access your files by turning on your machine.

When you share a password-protected Excel file, never send the password in the same message or email as the file. Send the file through one channel (email, cloud link, or file transfer) and the password through a different channel (a phone call, a separate email, or a password manager shared link). This way, if someone intercepts one message, they do not have both pieces needed to open the file.

Frequently Asked Questions

Can I remove the password from an Excel file?

Yes, if you know the password. Open the file, go to File > Info > Protect Workbook > Encrypt with Password, and leave the password field blank. Click OK and save. The file will no longer be encrypted. If you do not know the password, you cannot remove it.

Does password protecting an Excel file slow it down?

No. Encryption happens when you save and when someone opens the file, but it does not affect how fast Excel runs once the file is open. The performance impact is negligible on modern computers.

Can someone break a password-protected Excel file?

Older versions of Excel (before 2007) used weak encryption that could be broken with specialized software. Modern Excel uses strong encryption that is not practical to break by guessing. However, if someone has advanced technical skills and significant time, they may be able to attempt a brute-force attack, which is why a strong, unique password matters.

What happens if I password protect a file and then forget to save it?

If you set a password but close the file without saving, the password will not be applied. Excel will ask you if you want to save changes. Click Yes to save the file with the password encryption. If you click No, the file remains unencrypted.

Can I use the same password for multiple Excel files?

You can, but it is not recommended. If someone learns the password to one file, they can open all your files. Use a unique password for each file, or at least use different passwords for files containing different types of sensitive information. A password manager makes this easier to manage.