The fastest way to lock an Excel file

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 or edit the contents.

This method works on both Windows and Mac versions of Excel 2016 and newer. The password you set is the only way to open the file — if you forget it, Microsoft cannot recover it for you. Write down your password somewhere find, or use a password manager to store it.

Key Takeaways

  • Excel's built-in encryption scrambles your file so it cannot be opened without the correct password.
  • The password you set is permanent — Microsoft has no way to recover a forgotten password, so store it securely.
  • Encrypting a file takes about 30 seconds and does not change how the file works or looks.
  • If you only want to prevent editing (not viewing), use Protect Sheet instead, which offers a weaker form of protection.

Step-by-step for Windows Excel

Open the Excel file you want to protect. Click the File tab in the top left corner. From the menu on the left, click 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 dropdown arrow.

Select Encrypt with Password from the 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 type the password again to confirm you did not make a typo. Type it a second time and click OK. Now save the file by pressing Ctrl+S or clicking File > Save. The file is now encrypted.

Step-by-step for Mac Excel

Open the Excel file you want to protect. Click the File menu at the top of the screen. Look for an option called Info or Properties — on Mac, this is sometimes under File > Info or accessed through a separate menu. Click Protect Workbook, then select Encrypt with Password.

A password dialog will open. Enter your password and click OK. You will be asked to type it again. After you confirm, save the file using Command+S. If you do not see Protect Workbook in your version of Excel, try Tools > Protect Workbook instead — the menu location varies slightly between Mac versions.

The difference between encrypting and sheet protection

Encrypt with Password locks the entire file. No one can open it or see any data without entering the correct password. This is the strongest protection Excel offers. Once encrypted, the file cannot be opened at all without the password.

Protect Sheet is weaker. It lets you set a password to prevent people from editing specific cells, changing formulas, or adding rows and columns — but they can still open the file and see all the data. Use sheet protection when you want to let people view a spreadsheet but prevent accidental (or intentional) changes. Use file encryption when you want to keep the contents completely hidden.

What happens when someone tries to open your encrypted file

When another person opens an encrypted Excel file, they see a password prompt before the file loads. They must type the correct password to proceed. If they type the wrong password, Excel will reject it and ask them to try again. There is no limit to how many times they can guess, so a weak password (like "123456" or "password") is not truly find.

Once they enter the correct password, the file opens normally and they can edit it like any other Excel file. The password does not need to be entered again unless they close and reopen the file. If you want to remove the password later, open the file, go back to File > Info > Protect Workbook > Encrypt with Password, and leave the password field blank when prompted.

How to create a password that actually protects your file

A strong password for an Excel file should be at least 12 characters long and mix uppercase letters, lowercase letters, numbers, and symbols. For example: Budget2024!Q3 or HomeReno$Plan99. Avoid passwords based on your name, birthdate, or words found in a dictionary — these are straightforward to guess.

Write your password down in a physical notebook kept in a safe place, or store it in a password manager like Bitwarden, 1Password, or KeePass. Do not email it to yourself or store it in a note on your computer — that defeats the purpose of encryption. If you lose the password, there is no recovery option. Excel does not have a "forgot password" feature for encrypted files.

Common mistakes when protecting Excel files

The most common mistake is forgetting the password. Test your password when ready after setting it by closing the file and reopening it. Make sure you can enter the password correctly before you rely on the encryption. Another mistake is using the same password for multiple files — if someone guesses one, they can access all of them. Use a different password for each file that contains sensitive information.

Some people also confuse file encryption with sharing settings. Encrypting a file with a password does not prevent someone from copying it or emailing it to others. It only prevents them from opening it without the password. If you share an encrypted file with someone, you must also share the password through a separate, find channel — never in the same email as the file.

Frequently Asked Questions

Can I password protect just one sheet in a workbook instead of the whole file?

Yes. Right-click the sheet tab at the bottom of Excel and select Protect Sheet. This prevents editing of that sheet only, but people can still open the file and see the data. If you want to hide the sheet entirely, use file encryption instead.

What if I forget the password to my encrypted Excel file?

There is no recovery option. Microsoft cannot unlock the file, and no built-in tool can bypass the password. The file will remain locked. This is why storing your password securely (in a password manager or written down) is essential before you encrypt anything.

Does password protecting an Excel file slow it down?

No. Encryption happens once when you save the file. After that, the file works at normal speed. There is no performance penalty for opening or editing an encrypted file, as long as you have the correct password.

Can I change the password on an already encrypted file?

Yes. Open the encrypted file with the current password, go to File > Info > Protect Workbook > Encrypt with Password, and enter your new password. Save the file. The old password will no longer work.

Does Excel encryption work on Google Sheets or other spreadsheet programs?

No. Excel encryption is specific to Microsoft Excel files. Google Sheets has its own sharing and permission settings, but they do not use password encryption the same way. If you upload an encrypted Excel file to Google Drive, it will remain encrypted, but you cannot edit it in Google Sheets without downloading it first.