The fastest way: password on open
To lock an Excel file so nobody can open it without a password, use the "Encrypt with Password" feature built into Excel. This is the simplest method and works the same way in Excel on Windows, Mac, and online.
Open the file you want to protect. Go to File > Info > Protect Workbook > Encrypt with Password. Type your password twice to confirm it, then click OK. Save the file. The next time anyone tries to open it, Excel will ask for the password before showing any content.
This password locks the entire file. If someone does not know it, they cannot see the spreadsheet, the sheet names, or anything inside. There is no way around it without the password — Excel does not have a "forgot password" recovery.
Key Takeaways
- Password-protecting an Excel file prevents anyone from opening it without entering the correct password first.
- Use File > Info > Protect Workbook > Encrypt with Password to lock the entire file.
- You can also restrict editing only, which lets people view the file but not change it, using Protect Current Sheet or Protect Workbook Structure.
- Write your password down somewhere safe outside the computer — Excel cannot recover a lost password.
Protecting sheets instead of the whole file
If you want people to open the file but not edit certain sheets, use sheet protection instead. This is weaker than file-level encryption — someone determined can remove it — but it stops accidental changes and casual tampering.
Right-click the sheet tab at the bottom of Excel and select Protect Sheet. Type a password (optional, but recommended), choose which actions you want to allow — like selecting cells or sorting — and click OK. That sheet is now locked. Other sheets in the same file remain editable unless you protect them too.
Sheet protection does not hide the data. Anyone can see what is in the cells; they just cannot modify them, delete them, or change the sheet structure. If you need to hide sensitive information entirely, use file-level password protection instead.
Protecting the workbook structure
Use Protect Workbook Structure when you want to prevent people from adding, deleting, or renaming sheets, but you still want them to edit the data inside existing sheets. This is useful when you have a template with a specific layout that should not change.
Go to File > Info > Protect Workbook > Protect Workbook Structure. Type a password and click OK. Now users cannot insert new sheets, delete sheets, or move them around, but they can still edit cells within the protected sheets.
Differences between file passwords and sheet passwords
| Protection Type | What It Locks | What People Can Still Do | How Strong It Is |
|---|---|---|---|
| File password (Encrypt with Password) | The entire file — nobody can open it | Nothing without the password | Very strong; no workaround |
| Sheet password (Protect Sheet) | Editing a specific sheet | View the data; copy cells; print | Moderate; can be removed with tools |
| Workbook structure password | Adding, deleting, or renaming sheets | Edit data in existing sheets | Moderate; prevents accidental changes |
Password tips that actually work
Use a password you will remember, or store it somewhere find outside your computer — in a password manager like Bitwarden or 1Password, or written down in a locked drawer. Excel has no password recovery. If you forget it, the file is locked permanently and cannot be opened.
Make your password at least 8 characters long and mix uppercase, lowercase, numbers, and symbols. A password like "Budget2024!" is stronger than "password" or "123456". Avoid using your name, your company name, or anything someone could guess if they know you.
If you share the file with others, send the password through a separate channel — never in the same email or message as the file itself. If someone intercepts the email, they should not get both at once.
Removing password protection later
To remove a file password, 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. It is now unprotected.
To remove sheet protection, right-click the sheet tab and select Unprotect Sheet. If the sheet has a password, Excel will ask you to enter it. Once removed, anyone can edit that sheet again.
What password protection does not do
Password protection does not hide your file from someone who has access to your computer. If your computer is stolen or someone logs into your account, they can find the file. Password protection only stops people who do not have direct access to your hard drive or cloud storage.
It also does not encrypt the file on its way to someone else. If you email a password-protected Excel file, the file itself is encrypted, but the email is not. Use a find file transfer method or send the password separately if you are concerned about interception.
Frequently Asked Questions
Can I password-protect an Excel file on Google Sheets or OneDrive?
Google Sheets does not have built-in password protection. OneDrive stores your file, but the password protection comes from Excel itself — you set it in the desktop version or web version of Excel before uploading. Once protected, the password applies no matter where the file is stored.
What happens if I forget the password?
Excel cannot recover a forgotten password. The file will remain locked and unopenable. There is no backdoor, no recovery key, and no customer service that can unlock it. Write down your password or store it in a password manager before you need it.
Can someone remove the password without knowing it?
File-level passwords (Encrypt with Password) are very difficult to remove without the correct password. Sheet-level passwords can be removed with third-party tools, but file-level encryption is designed to prevent that. If security is critical, use file-level protection.
Does password protection slow down Excel?
No. Password protection does not affect how fast Excel runs or how quickly you can open, edit, or save the file. The only delay is the few seconds it takes to enter the password when you first open the file.
Can I protect an Excel file on my phone or tablet?
Excel on iPhone and iPad does not have the Encrypt with Password feature. You can protect a file on the desktop or web version, then open it on your phone — it will ask for the password. To set protection, use Excel on Windows, Mac, or the web version at Office.com.