The fastest way to password protect your Excel file

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

This method encrypts the entire file, so no one can open it without the correct password. It takes about 30 seconds and works the same way on Windows and Mac versions of Excel 2016 and newer.

Key Takeaways

  • Password protection in Excel encrypts the whole file, so the file cannot be opened at all without the password.
  • The Encrypt with Password option is found under File > Info > Protect Workbook in Excel 2016 and newer on both Windows and Mac.
  • You must type your password twice to confirm it, and Excel will not show you what you typed, so write it down before you start.
  • If you forget the password, there is no built-in recovery method — Microsoft cannot retrieve it for you.

Step-by-step instructions for Windows

Open the Excel file you want to protect. Click the File tab in the top left corner. In the left sidebar, 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 the dropdown arrow next to Protect Workbook and select Encrypt with Password. A dialog box will appear with a field labeled Password. Type your password in this field. Excel will not display what you type — you will see only dots or asterisks. Click OK.

A second dialog box will appear asking you to confirm your password. Type the same password again and click OK. Excel will now save the file with password protection. The next time the file is opened, the person opening it will see a password prompt before the spreadsheet loads.

Step-by-step instructions for Mac

Open the Excel file you want to protect. Click the File menu at the top of the screen. In the dropdown menu, click Info. You will see a section labeled Protect Workbook with a button that says Encrypt with Password.

Click Encrypt with Password. A dialog box will appear with a field labeled Password. Type your password and click OK. A second dialog will ask you to confirm the password. Type it again and click OK. Save the file using File > Save or by pressing Command + S.

What happens when someone tries to open the file

When a password-protected Excel file is opened, the person opening it will see a dialog box titled Password with a single text field. They must type the correct password to proceed. If they type the wrong password and click OK, Excel will display an error message and return to the password prompt. They can try again as many times as they want.

If the correct password is entered, the file opens normally and the person can view, edit, and save it as usual. The password protection does not limit what they can do inside the file — it only controls whether they can open it in the first place.

Changing or removing a password

To change the password on an already-protected file, open the file and enter the current password when prompted. Once the file is open, go to File > Info > Protect Workbook > Encrypt with Password again. You will see the password field, but it will be empty. Type the new password, confirm it, and save the file.

To remove the password entirely, follow the same steps but leave the password field blank when the Encrypt with Password dialog appears. Click OK without typing anything. The file will no longer require a password to open.

Important limits of Excel password protection

Excel password protection prevents someone from opening the file without the password, but it does not prevent them from copying the file to another location or sending it to someone else. Once someone has the password and opens the file, they can do anything a normal user can do — edit cells, delete sheets, and save changes.

If you forget the password, Microsoft cannot retrieve it for you. There is no password recovery option or master key. You will not be able to open the file. Write down your password and store it somewhere find, or use a password manager to keep track of it.

Other ways to restrict what people can do in Excel

Password protection locks the entire file. If you want to let people open the file but prevent them from editing certain cells or sheets, you can use Sheet Protection or Workbook Protection instead. These features let you set a password and then choose which actions are allowed — for example, you can let people view and sort data but prevent them from deleting rows or changing formulas.

Sheet Protection is found under the Review tab in Excel. Click Protect Sheet, set a password, choose which actions to allow, and click OK. This protects only the current sheet, not the whole file. Workbook Protection (also under Review > Protect Workbook) prevents people from adding, deleting, or moving sheets, but they can still edit the cells inside existing sheets.

Frequently Asked Questions

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

Yes. Click the Review tab, then Protect Sheet. Set a password and choose which actions people can perform on that sheet. This lets people open the file without a password but prevents them from editing the protected sheet. File-level password protection (under File > Info) locks the entire file.

What if I forget the password?

There is no way to recover a forgotten password in Excel. Microsoft does not have a master key or recovery process. If you forget the password, you cannot open the file. Always write down your password or store it in a password manager before you protect the file.

Does password protection work in Google Sheets or LibreOffice?

Google Sheets does not have file-level password protection. LibreOffice Calc has a similar feature under Tools > Protect Document > Encrypt with Password. Files protected in LibreOffice may not open in Excel without additional steps, so test before sharing.

Can someone break the password if they have the file?

Excel password protection is encryption, not just a straightforward lock. Breaking it would require significant computing power and time. For personal or small-business files, password protection is sufficient. For highly sensitive data, consider additional security measures like storing files on an encrypted drive.

Will the password protect the file if I email it or upload it to the cloud?

Yes. The password protection is built into the file itself, not dependent on where it is stored. Whether the file is emailed, uploaded to OneDrive, Google Drive, or Dropbox, anyone who opens it will be asked for the password. The password travels with the file.