
How to Password Protect an Excel File
Spreadsheets tend to hold more sensitive information than people realize until they stop and think about it — salary data, client lists, financial projections, passwords stored “just for now,” personal budgets. If that file ends up on a shared drive, gets emailed to the wrong person, or sits on a laptop that goes missing, a password is often the only thing standing between your data and anyone who opens it.
Excel has built-in password protection that doesn’t require any add-ons or third-party tools. It offers a few different levels of protection depending on what you’re trying to prevent: stopping someone from opening the file at all, allowing them to view it but not edit it, or locking specific cells while leaving others editable. This guide walks through each option, how to set it up on both Windows and Mac, and what to do if you ever lose the password yourself.
What You’ll Need Before You Start
- Microsoft Excel, either the desktop app (Windows or Mac) or Microsoft 365
- The spreadsheet file you want to protect
- A password you’ll actually remember, or a password manager to store it in
One important thing to understand before you start: Excel does not offer any password recovery option. If you forget the password you set, Microsoft cannot retrieve or reset it for you. Choose something memorable, or store it somewhere safe, before locking anything important.
Step 1: Decide What Kind of Protection You Need
Excel offers three distinct types of password protection, and picking the right one matters:
- Password to open — Nobody can even view the file’s contents without entering the password first. This is the strongest option and what most people mean by “password protecting” a file.
- Password to modify — Anyone can open and view the file, but editing requires a password. Useful when you want to share information freely but prevent accidental or unauthorized changes.
- Sheet or workbook protection — Locks specific cells, sheets, or the overall structure (like preventing new sheets from being added or deleted) while leaving the rest editable. This is more about preserving formulas and formatting than restricting access.
The steps below cover all three, starting with the most common one.
Step 2: Set a Password to Open the File (Windows)
- Open the Excel file you want to protect.
- Go to File > Info.
- Type your password in the dialog box that appears, then click OK.
- Re-enter the same password to confirm, then click OK again.
- Save the file (Ctrl+S or File > Save) to apply the encryption.
The next time anyone opens this file, including you, Excel will prompt for the password before showing any content.
Step 3: Set a Password to Open the File (Mac)
- Go to File > Passwords in the menu bar (or Review > Protect > Protect Workbook, depending on your Excel version).
- Under Password to open, enter your chosen password.
- Click Set Password, then confirm by entering it a second time.
- Save the file to apply the change.
Mac versions of Excel have moved this menu location across updates, so if you don’t see File > Passwords, check under the Review tab instead — Microsoft has shifted this feature’s location a few times in recent releases.
Step 4: Set a Password to Modify (Instead of, or In Addition to, Opening)
If you want people to be able to view the file freely but not make changes without a password:
On Windows:
- Go to File > Save As, and choose the location you’re saving to.
- In the Save dialog, click Tools (near the Save button), then select General Options.
- Enter a password under Password to modify.
- Click OK, confirm the password, then click Save.
On Mac:
- Go to File > Save As.
- Click Options in the Save dialog (or look for a security/password option depending on your version).
- Enter a password under the modify field.
- Confirm and save.
You can set both a “password to open” and a “password to modify” simultaneously, using different passwords for each if you want layered control — for example, letting a broader group view the file while only a smaller group can actually edit it.
Step 5: Protect Specific Sheets or Cells
Sometimes the goal isn’t restricting access to the whole file, but preventing changes to specific formulas, headers, or reference data while still letting people enter data elsewhere.
- Select the cells you want to remain editable (by default, all cells are locked once sheet protection is turned on, so you need to explicitly unlock the ones you want people to use).
- Right-click the selected cells, choose Format Cells, go to the Protection tab, and uncheck Locked.
- Set a password if you want one (optional — you can protect a sheet without a password if you just want to prevent accidental changes rather than deliberate ones).
- Choose which actions to still allow (like selecting cells or sorting) from the checklist, then click OK.
This is especially useful for shared templates, budget spreadsheets with locked formulas, or any file where certain cells should never be touched but others need regular input.
Step 6: Protect the Workbook Structure
If you want to prevent someone from adding, deleting, renaming, or rearranging sheets — without locking individual cell content — use workbook structure protection instead.
- Go to the Review tab.
- Click Protect Workbook (this is different from the encryption option in Step 2 — this one specifically covers structure, not content access).
- Optionally set a password.
- Click OK.
This doesn’t stop someone from editing cell values on existing sheets; it specifically locks the overall layout of the workbook itself.
Platform Variations Worth Knowing
- Excel for Windows vs. Excel for Mac: The underlying encryption is identical, but menu locations differ, particularly for the “password to modify” option, which has moved between the Save dialog and other menus across various Mac Excel updates. If a menu item mentioned here isn’t where expected, check under Review or File as an alternative.
- Excel Online (browser version): Password-to-open protection isn’t available directly through Excel Online — you’ll need to open the file in the desktop app to apply full encryption. Excel Online can open and edit files that already have passwords set through the desktop version, prompting for the password as expected.
- Older Excel versions (2010 and earlier): These use a weaker encryption standard by default compared to modern Excel (2013 onward), which uses stronger AES-256 encryption. If security is a serious concern, opening and re-saving an old file with a current version of Excel and reapplying the password upgrades the encryption strength.
- Microsoft 365 subscription vs. one-time purchase (Excel 2019, 2021, etc.): Both support all the password protection methods covered here. Microsoft 365 occasionally gets minor interface refinements first, but the core functionality doesn’t differ.
- Shared files via OneDrive or SharePoint: Password-to-open protection works differently for files being co-authored in real time through OneDrive or SharePoint, since simultaneous editing conflicts with requiring a password on open. If you need both real-time collaboration and access restriction, use sharing permissions (controlling who has access to the file at all) rather than a file-level password for that use case.
Tips
- Use a genuinely strong password, not something guessable. A password like “password123” or your company name defeats the purpose almost entirely. Aim for a mix of letters, numbers, and symbols, ideally generated or stored through a password manager rather than something you’re trying to memorize from scratch.
- Store the password somewhere separate from the file itself. This sounds obvious, but it’s a common mistake — writing the password in a text file saved right next to the protected spreadsheet defeats the protection immediately if both are shared or found together.
- Test the password immediately after setting it. Close and reopen the file right after applying protection to confirm it works as expected, before you’re relying on it weeks or months later.
- Combine sheet protection with file-level password protection for layered security. A password to open the file prevents unauthorized access entirely, while sheet or cell protection prevents accidental changes even by people who are supposed to have access — the two serve different purposes and work well together.
- Keep a securely stored backup copy without a password, if appropriate for your situation. If you’re the sole owner of the file and worried about ever losing the password, keeping an unprotected backup in a secure location (like an encrypted drive or a password-protected folder at the operating system level) gives you a fallback that doesn’t rely on remembering the Excel-specific password.
- Communicate passwords through a separate channel than the file itself. If you’re sharing a protected file with someone else, send the password via a different method — a phone call, a separate secure message, or a password manager’s sharing feature — rather than in the same email as the attachment.
Troubleshooting Common Issues
- I forgot the password and can’t open my own file. Unfortunately, Excel does not offer a built-in recovery method, and Microsoft cannot bypass this encryption on your behalf. Third-party password recovery tools exist, but their success rate varies significantly depending on the Excel version and encryption strength used, and using them on sensitive files carries its own security risks worth considering carefully.
- The password protection isn’t saving after I close and reopen the file. Make sure you clicked Save after setting the password, not just OK in the password dialog. The password is only applied once the file itself is saved with the change.
- I set a password to modify, but people can still edit the file. Check whether they might be working from a cached or previously opened version of the file rather than the currently protected one, particularly if the file is stored in a shared cloud location. Also confirm you set the password under the correct option in the Save dialog (Step 4), not accidentally under the open-password field instead.
- Sheet protection is preventing actions I actually want to allow, like sorting or filtering. When setting sheet protection (Step 5), review the checklist of allowed actions in the Protect Sheet dialog — options like sorting, using AutoFilter, and formatting cells can each be individually permitted even while the sheet is otherwise protected.
- I can’t unlock specific cells because the whole sheet is protected. You need to unprotect the sheet first (Review > Unprotect Sheet, entering the password if one was set), make your changes to which cells are locked or unlocked, then reapply sheet protection afterward.
- The file opens fine for me but prompts a coworker for a password I never set. This can happen if the file was previously protected by someone else before being shared with you, or if it’s synced through a shared drive with permissions set at the folder or file-sharing level rather than the Excel encryption level — these are two separate systems that can sometimes appear similar from a user’s perspective.
- Password protection isn’t available at all in my version of Excel. Very old or limited versions (some free or mobile-only versions) may not support file encryption. Confirm you’re using a full desktop installation of Excel rather than a lightweight viewer or mobile app with reduced functionality.
Conclusion
Password protecting an Excel file is a genuinely effective way to keep sensitive spreadsheet data secure, and Excel’s built-in tools cover most situations without needing anything beyond what’s already installed. The key decision is matching the protection type to your actual goal — full open-password encryption for real access control, modify-passwords for shared visibility with edit restrictions, or sheet and cell protection for preserving formulas and structure within a file people can otherwise use freely.
Whichever method you choose, the password itself is only as strong as how carefully it’s chosen and stored — a great encryption method paired with a weak or easily-shared password doesn’t protect much. Take the extra minute to choose something strong and store it properly, and Excel’s built-in protection will do exactly what it’s designed to do.
Frequently Asked Questions
1. Can someone bypass Excel’s password protection without the password?
Modern Excel (2013 and later) uses strong AES-256 encryption for the “password to open” feature, which is very difficult to bypass without the correct password using standard methods. Older versions and other protection types (like sheet protection) use weaker methods that are more vulnerable to third-party removal tools.
2. Is there a difference in security between “password to open” and sheet protection?
Yes, significantly. Password to open uses genuine file encryption, meaning the file’s contents are unreadable without the password. Sheet protection is more of a usage restriction within an otherwise accessible file and offers much weaker security, since specialized tools can often remove it relatively easily.
3. Can I password protect an Excel file on my phone? The Excel mobile app has limited support for this depending on your device and app version — some versions allow opening password-protected files but not setting new passwords. For reliable password creation, use the desktop version of Excel.
4. Will password protection work if I convert the Excel file to PDF or another format?
No, password protection set within Excel is specific to the Excel file format. If you export or convert the file, you’ll need to apply separate protection appropriate to that new format (PDF has its own password protection options, for instance).
5. Can I remove a password from an Excel file later?
Yes, as long as you know the current password. Open the file, go to File > Info > Protect Workbook > Encrypt with Password (Windows) or the equivalent Mac menu, clear the password field, and save. This removes the encryption entirely.
6. Does password protecting a file prevent it from being deleted or copied?
No, file-level passwords in Excel only control opening and editing the file’s contents. Deleting or copying the file itself is controlled by your operating system’s file permissions, not Excel’s password protection.
7. Is it safe to email a password-protected Excel file?
It’s reasonably safe for the file’s contents, since encryption prevents casual access even if the email is intercepted or sent to the wrong address. However, sending the password in the same email defeats much of that protection — send the password through a separate channel for genuine security.
8. Can multiple people share the same password to open a protected file?
Yes, Excel doesn’t track individual users through its built-in password feature — anyone with the correct password can open the file. If you need to track who accessed a file individually, that requires a different approach, like SharePoint or OneDrive permissions tied to specific user accounts rather than a shared password.
