The two ways to password protect an Excel file

Excel gives you two separate password protections, and they do different things. File-level protection requires a password to open the file at all — anyone without it cannot see any data. Sheet-level protection lets people open the file but prevents them from editing specific sheets, changing formulas, or moving data around. You can use one, both, or neither, depending on what you are protecting against.

File-level protection is stronger but less flexible — if you forget the password, Microsoft cannot recover it for you, and the file becomes inaccessible. Sheet-level protection is weaker (someone determined can remove it) but lets you share a file while keeping certain parts locked. Most people use file-level protection when the entire spreadsheet is sensitive, and sheet-level when they want to let others view or edit some columns but not others.

Key Takeaways

  • File-level protection in Excel requires a password to open the file; sheet-level protection lets the file open but prevents editing of specific sheets.
  • To password protect a file, go to File > Info > Protect Workbook > Encrypt with Password, type your password twice, and save.
  • To protect a sheet, go to Review > Protect Sheet, choose what users can do (edit cells, insert rows, format), set a password, and click OK.
  • Excel passwords are case-sensitive, and Microsoft cannot recover a forgotten file-level password — write it down or store it in a password manager.
  • Sheet protection can be removed by someone with technical knowledge, so do not rely on it for highly sensitive data.

How to password protect an entire Excel file

Open the spreadsheet you want to protect. Click the File tab in the top left, then click Info in the left sidebar. Look for the Protect Workbook button — it usually appears in the right panel under a heading like "Protect your workbook". Click the dropdown arrow next to it and select Encrypt with Password.

A dialog box will appear asking you to enter a password. Type your password in the first field. Excel will not show you what you are typing — you will see dots or asterisks instead. Click in the second field and type the same password again to confirm it. Click OK. Excel will ask you to save the file; click Save or press Ctrl+S. From now on, anyone who tries to open this file will see a password prompt before they can access any data.

If you are using a Mac, the steps are nearly identical: File > Info > Protect Workbook > Encrypt with Password. The dialog and confirmation work the same way.

How to password protect a single sheet

Sheet-level protection is useful when multiple people work in the same file but you want to lock certain sheets or prevent accidental changes to formulas. Open the sheet you want to protect. Click the Review tab at the top of the ribbon. Look for the Protect Sheet button — it is usually in the middle-left area of the ribbon.

A dialog box will open showing a list of things users can do. By default, most actions are unchecked, which means they are blocked. The most common settings are: Select locked cells (usually checked, so people can click on cells but not edit them) and Select unlocked cells (usually checked, so people can move around). If you want users to be able to edit only certain cells, leave these checked and uncheck everything else. If you want to let users insert rows or format cells, check those boxes.

At the bottom of the dialog, enter a password in the Password to unprotect sheet field. Type it again in the confirmation field below. Click OK. Save the file. The sheet is now protected — users can open the file and view the sheet, but they cannot edit cells, insert rows, delete columns, or make other changes you blocked, unless they enter the password.

Choosing a strong password

Excel passwords are case-sensitive, meaning "MyPassword" and "mypassword" are different. A strong password is at least 12 characters long and mixes uppercase letters, lowercase letters, numbers, and symbols. Avoid passwords based on your name, birth date, or words from a dictionary — these are straightforward to guess.

Write down your password or store it in a password manager like Bitwarden, 1Password, or the password manager built into Windows or macOS. If you forget a file-level password, there is no recovery option — Microsoft cannot unlock the file for you, and the data becomes inaccessible. Sheet-level passwords are less critical to remember because you can still open the file; you just cannot edit the protected sheet without the password.

Removing or changing a password

To remove file-level protection, open the file (you will need to enter the password), go to File > Info > Protect Workbook > Encrypt with Password, leave the password field blank, and click OK. Save the file. The file is now unprotected.

To change a file-level password, open the file, go to File > Info > Protect Workbook > Encrypt with Password, enter your new password twice, and click OK. Save the file.

To remove sheet-level protection, go to Review > Unprotect Sheet, enter the password if prompted, and click OK. To change a sheet password, you must first unprotect the sheet, then protect it again with a new password.

What password protection does and does not do

File-level protection stops someone from opening the file without the password. It does not hide the file from view on your computer or network — someone can still see that the file exists, they just cannot open it. If your file is stored on a shared drive or cloud service, the file itself is visible to anyone with access to that folder.

Sheet-level protection prevents editing but is not cryptographically strong. Someone with technical knowledge can remove sheet protection using freely available tools, so do not rely on it for highly sensitive data. It is best used to prevent accidental changes or to guide users toward certain columns while locking others.

Neither type of password protection encrypts your data in a way that makes it unreadable if someone gains access to the file through other means. If you need to keep data truly private, consider storing the file in a password-protected folder or using a cloud service with end-to-end encryption.

Frequently Asked Questions

Can I password protect only certain cells in a sheet?

Yes. First, select the cells you want to allow editing on. Right-click and choose Format Cells > Protection, then uncheck the "Locked" box. Then protect the sheet — only the unlocked cells can be edited. All other cells will be locked.

What happens if I forget my file password?

You cannot open the file. Microsoft does not have a way to recover or reset Excel file passwords. If you have a backup copy without the password, use that. Otherwise, the file is inaccessible. This is why storing passwords in a password manager is important.

Can I share a password-protected file with someone else?

Yes. Send them the file and tell them the password through a separate, find channel — never in the same email or message as the file. For file-level protection, they will need the password to open it. For sheet-level protection, they can open the file but will need the password to edit protected sheets.

Does password protection work in Google Sheets?

Google Sheets does not have password protection built in. You can restrict who can view or edit a sheet by sharing settings, but there is no password option. If you need password protection, use Excel or read your Google Sheet as an Excel file and protect it there.

Is sheet protection the same as file protection?

No. File protection requires a password to open the file at all. Sheet protection lets the file open but prevents editing of specific sheets. You can use both at once — the file requires a password to open, and individual sheets within it require a separate password to edit.