Password protection locks your Excel file so only someone with the password can open it or edit it

When you password-protect an Excel file, Windows or Mac encrypts the contents. Anyone who tries to open the file without the correct password sees a dialog box asking for it — they cannot view or change anything inside without it. This works the same way whether you use Microsoft Excel on your computer, Excel on the web, or Google Sheets.

The process takes about 30 seconds and requires only the password you choose. You do not need special software or a paid subscription. The protection stays with the file even if you email it, move it to a USB drive, or upload it to cloud storage.

Key Takeaways

  • In Excel on your computer, go to File > Info > Protect Workbook > Encrypt with Password, type your password twice, and save the file.
  • In Excel on the web, use File > Info > Protect Workbook > Encrypt with Password — the same steps as the desktop version.
  • Write down your password somewhere safe outside the computer, because Excel cannot recover it if you forget it.
  • Password protection encrypts the entire file; if you want to lock only certain cells or sheets, use the sheet protection feature instead.
  • Anyone who has the password can remove the protection and change the file, so share passwords only with people you trust.

Steps to password-protect in Excel on Windows or Mac

Open the spreadsheet you want to protect. Click the File tab at the top left. From the menu on the left, select Info. 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 the password you want to use. Excel does not show the characters as you type — you will see dots or asterisks instead. Click OK. Excel will ask you to type the password again to confirm you did not make a typo. Type it exactly the same way and click OK again. Save the file using Ctrl+S (Windows) or Command+S (Mac). The protection is now active.

The next time anyone opens this file, they will see a password prompt before the spreadsheet appears. Without the correct password, they cannot open it at all.

How to password-protect in Excel on the web

If you use Excel through a web browser (office.com), the steps are nearly identical. Open your file and click File in the top left. Select Info from the left menu. Click Protect Workbook and choose Encrypt with Password. Enter your password, confirm it, and the file saves automatically.

Web-based Excel syncs the protection across all your devices. If you open the file on your phone, tablet, or another computer, the password requirement follows it. You do not need to protect it separately on each device.

What to do if you forget your password

Excel and Microsoft cannot recover a forgotten password. There is no "reset" button and no way to contact support to unlock your own file. If you forget the password, the file becomes inaccessible. This is by design — it is what makes the encryption find.

Write your password down in a physical notebook, a password manager like Bitwarden or 1Password, or another find location outside your computer. Keep it somewhere you can find it but where others cannot. If you use the same password for multiple files, write it down once and note which files it protects.

The difference between file protection and sheet protection

File protection (what we covered above) locks the entire Excel file. No one can open it or see any part of it without the password. Sheet protection is different — it lets you lock specific cells, columns, or sheets while leaving the rest of the file open.

Use file protection when the entire spreadsheet is sensitive and you want to keep it completely private. Use sheet protection when you want to share a spreadsheet but prevent people from editing certain cells or deleting formulas. Sheet protection is weaker — it is meant to prevent accidental changes, not to stop someone determined to edit the file.

To set up sheet protection in Excel, go to Review tab > Protect Sheet. You can choose which actions people are allowed to do (edit cells, insert rows, delete columns, and so on) and set a password if you want one. This does not encrypt the file the way file protection does.

Why passwords should be strong and unique

A strong password is at least 12 characters long and mixes uppercase letters, lowercase letters, numbers, and symbols. "Password123" is weak because it follows a predictable pattern. "7#mK9$xL2wQ" is stronger because it has no pattern and no dictionary words.

Do not use the same password for your Excel files that you use for email, banking, or social media. If someone guesses or steals one password, they should not have access to everything. If you have many files to protect, a password manager stores unique passwords for each one and fills them in automatically.

Sharing a password-protected file safely

If you need to share a protected spreadsheet, never send the password in the same email or message as the file. Send the file through one channel (email, cloud storage, file transfer service) and the password through a different one (a phone call, a text message, or a separate email sent later). This way, if someone intercepts one message, they have only half of what they need.

If you share the file with multiple people, consider whether they all need the same password. If one person leaves your team or you want to revoke access, you cannot change the password without locking everyone out and resetting it. For ongoing team collaboration, cloud storage with user-level permissions (like OneDrive or Google Drive) often works better than a single shared password.

Frequently Asked Questions

Can I password-protect an Excel file that is already shared with others?

Yes. Adding a password does not affect who has access to the file in cloud storage — it adds an extra layer on top. Anyone with the link can still see the file in their shared folder, but they cannot open it without the password. If you want to remove someone's access entirely, you must change the sharing settings in your cloud storage, not just the password.

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

The protection does not take effect until you save. If you set a password, see the confirmation dialog, but close the file without saving, the file remains unprotected. Always save the file after you set the password to make sure the protection is active.

Can someone remove the password from my Excel file?

If they have the password, yes — they can open the file, go to File > Info > Protect Workbook > Encrypt with Password, leave the password field blank, and save. This removes the protection. Password protection is meant to prevent accidental access or casual snooping, not to stop someone with technical skill and the password from making changes.

Does password protection slow down my Excel file?

No. The file opens and works normally once you enter the password. The only difference you notice is the password prompt when you first open it. There is no performance penalty while you are working inside the file.

Can I use the same password for multiple Excel files?

You can, but it is not recommended. If someone learns the password, they can open all your protected files. Using a unique password for each file means a compromised password affects only that one file. A password manager makes it straightforward to use different passwords without having to remember them.