How to Password Protect an Excel File (2026)
Home›Excel›Password Protect Excel
ExcelHow-To Post⏱ 11 min read

How to Password-Protect an Excel File (2026)

Excel has five different kinds of password protection — and they don't all do what people think they do. This guide covers each one, how to set and remove them, which are actually secure, and what to do when you forget the password.

The five levels of Excel protection

Before you click anything, understand what you're actually protecting. Excel has five distinct mechanisms, and only the first is real encryption. The others control specific behaviors within a file that anyone can already open.

TypePreventsSecurity
Password to openOpening the file at allStrong (AES-256 encryption)
Password to modifySaving changes to the fileWeak (bypassable by "Read Only")
Sheet protectionEditing cells on a specific sheetWeak (accidental changes only)
Workbook structureAdding, deleting, or reordering sheetsWeak
VBA projectViewing or editing VBA codeWeak in older Excel; stronger in 2019+
Only the opening password is real security

If confidentiality matters — client data, financial records, contracts — use the opening password. Everything else is guidance for well-behaved users, not defense against attackers. Third-party tools can crack sheet and structure passwords in seconds.

Password to open (encryption)

This is the strongest option. Excel encrypts the entire file with AES-256 (in Excel 2013 and newer). Without the password, the file's contents are unreadable — even to Microsoft.

How to set it

  1. Open the file you want to protect
  2. File → Info
  3. Click Protect Workbook → Encrypt with Password
  4. Type a strong password → OK
  5. Type the same password again to confirm → OK
  6. Save the file (Ctrl+S)

From next open, Excel prompts for the password. Enter it correctly and the file opens; enter the wrong one and Excel simply refuses.

Alternative: Save As dialog

  1. File → Save As → Browse to your location
  2. Click Tools (bottom of the Save As dialog) → General Options
  3. Enter a password in the "Password to open" field → OK
  4. Confirm the password → OK
  5. Save

What "strong" means for the password

  • 12+ characters minimum
  • Mix of uppercase, lowercase, numbers, and symbols
  • Not based on personal info (birthday, name, "password123")
  • Not reused from other accounts
  • Stored in a password manager — no exceptions
The encryption is only as strong as the password

AES-256 is unbreakable in practice — but "myname2024" as the password is guessable in seconds by any dictionary-attack tool. A strong random password from a password manager is genuinely secure. A weak password isn't.

Password to modify

Lets anyone view the file but requires a password to save changes. Useful for reference documents where accidental edits would be a problem.

How to set it

  1. File → Save As → Browse
  2. Click Tools → General Options
  3. Enter a password in the "Password to modify" field → OK
  4. Confirm → OK
  5. Save
The Read-Only bypass

When the file opens, users see a dialog with three buttons: "Password", "Read Only", "Cancel". Clicking Read Only opens the file without needing the password. Users can then view everything, save as a copy under a different name, and edit that copy freely. The modify password prevents accidental overwrite, not access.

When to use it

  • Templates you want people to fill out fresh copies of
  • Reference sheets where the master should stay unchanged
  • Shared workbooks where you're the owner and others review only

When not to

Don't use modify passwords as security. Sensitive data with just a modify password is effectively public — anyone can open, view, and re-save. Use the opening password instead.

Sheet protection

Locks specific cells on a specific sheet from editing. The workbook opens normally; individual sheets are read-only or partially editable based on your rules.

How it works: locked vs unlocked cells

Every cell in Excel has a "Locked" property (Format Cells → Protection tab). By default, all cells are locked — but the lock doesn't do anything until you turn on sheet protection.

The typical pattern:

  1. Select cells users should be able to edit (input fields, data-entry columns)
  2. Format Cells (Ctrl+1) → Protection tab → uncheck Locked → OK
  3. Review → Protect Sheet
  4. Optional: enter a password
  5. Choose what protected users are allowed to do (select cells, format columns, sort, autofilter, etc.)
  6. OK

Now the unlocked cells accept input; locked cells (everything you didn't unlock) refuse edits.

What sheet protection can prevent

Sheet protection blocks a specific set of actions. The Protect Sheet dialog lets you allow or deny each:

  • Selecting locked cells (usually leave this on so users can still copy values)
  • Formatting cells, columns, rows
  • Inserting or deleting rows/columns
  • Sorting
  • Using AutoFilter
  • Using PivotTables and PivotCharts
  • Editing objects and scenarios
Common setup for data-entry sheets

Unlock input cells (usually one column). Turn on Protect Sheet with "Select unlocked cells" allowed but no other permissions. Users tab through only the input cells and can't accidentally overwrite formulas, headers, or lookup tables.

Removing sheet protection

Review → Unprotect Sheet. Enter the password (if set). The sheet is now editable normally.

Sheet passwords are trivial to crack

Sheet protection passwords use an old, weak hashing scheme. Free tools online can remove them in seconds. Never use sheet protection for confidentiality — only for preventing accidents.

Workbook structure protection

Prevents users from adding, deleting, hiding, unhiding, or reordering sheets. Also prevents renaming sheets. Useful for finished models where the sheet structure is part of the design.

How to set it

  1. Review → Protect Workbook
  2. Check Structure
  3. Optional: enter a password
  4. OK

What it does

  • Insert Sheet: greyed out
  • Delete Sheet: greyed out
  • Rename Sheet: blocked
  • Move/Copy Sheet: blocked
  • Hide/Unhide Sheet: blocked
  • Right-click sheet tab menu: most options greyed

What it doesn't do

Cell editing on the sheets is unaffected. Users can still change values, formulas, and formatting on any visible sheet — that's what sheet protection is for.

VBA project password

Prevents users from viewing or editing your VBA code in the editor. Useful when you've built macros you don't want others to modify or copy.

How to set it

  1. Open the VBA editor (Alt+F11)
  2. Tools → VBAProject Properties
  3. Protection tab
  4. Check Lock project for viewing
  5. Enter password and confirm
  6. OK
  7. Save and close the workbook
  8. On next open, VBA code is hidden until password is entered
Older Excel VBA passwords are weak

VBA project passwords in .xls (Excel 97-2003) and older versions can be removed with a hex editor in minutes. Modern .xlsm files use stronger protection but still shouldn't be relied on for real IP protection. If your macros are truly proprietary, consider distributing as an .xlam add-in with the code compiled or as a COM add-in.

Removing passwords

Remove opening password

  1. Open the file with the current password
  2. File → Info → Protect Workbook → Encrypt with Password
  3. Clear the password field (delete the dots)
  4. OK
  5. Save

Remove modify password

  1. Open normally (with the modify password, or Read Only + Save As if you don't have it)
  2. File → Save As → Tools → General Options
  3. Clear the "Password to modify" field → OK
  4. Save

Remove sheet protection

  1. Review → Unprotect Sheet
  2. Enter password
  3. Sheet is unlocked

Remove workbook structure protection

  1. Review → Protect Workbook (button acts as toggle)
  2. Enter password if set
  3. Structure protection is off

Remove VBA password

  1. Alt+F11 to open VBA editor
  2. Enter the password when prompted
  3. Tools → VBAProject Properties → Protection tab
  4. Uncheck "Lock project for viewing"
  5. Clear the password fields
  6. OK, then save the workbook

If you forget the password

Opening password (strong protection)

There is no legitimate way to recover a forgotten opening password on modern Excel. Microsoft does not have a master key. AES-256 with a strong password is designed to be unrecoverable.

Third-party "password recovery" tools exist. They work by brute-forcing common passwords or dictionary attacks — effective against weak passwords but useless against strong ones. Reputable options include Passware, PassFab, and iSunshare. Expect success only if:

  • The password is short (under 8 characters)
  • The password is a common word or predictable pattern
  • You remember partial information (starts with, length, character types)

If the file was created in Excel 2010 or earlier and never re-saved in a newer version, the encryption is weaker and recovery is more feasible.

Sheet, structure, and VBA passwords (weak protection)

These are usually recoverable, since the protection is not real encryption. Third-party tools remove them reliably. For non-sensitive scenarios (you protected a sheet years ago and forgot the password), online tools work.

Be cautious with recovery services

Uploading a business file to an unknown online password remover is a data leak in itself. If the file contains anything sensitive, use offline tools with a reputable vendor — not free web utilities that keep a copy on their server.

Best practices

Store passwords in a password manager

1Password, Bitwarden, KeePass, and similar tools generate strong random passwords and remember them for you. Never write passwords in the file's own metadata, filename, or a "Passwords.txt" next to it.

Match the protection to the threat

  • Confidential data leaving your organization: Opening password + strong random password
  • Template that shouldn't be overwritten: Modify password
  • Data-entry form for coworkers: Sheet protection (no password needed)
  • Finished model with fixed structure: Workbook structure protection

Test the protection before sharing

Close the file. Open it with a wrong password. Confirm Excel refuses. Open with the correct password. Confirm it opens. Sounds obvious but the "I set a password but forgot to save" mistake is common.

Combine encryption with other measures for real security

  • Send passwords out-of-band (SMS or a different email account, not with the file)
  • Use SharePoint or OneDrive permissions instead of file-level passwords when possible — better audit trails and easier revocation
  • For truly sensitive data, use dedicated secure sharing tools (Firmex, Datasite) rather than passworded Excel files

Document what's protected

Keep a "Notes" sheet listing which sheets are protected and why. Six months later, you or a colleague will thank you.

Google Sheets equivalent

Google Sheets doesn't have file-level passwords — access is controlled by Google account permissions instead. You share with specific people or restricted groups; nobody outside that list can open the file at all.

For within-sheet protection, use Data → Protect sheets and ranges. Similar to Excel's sheet protection: mark ranges as editable only by specific users. Because Google Sheets identifies users by account, this is stronger than Excel's password model — no password to share, no password to leak.

Downsides: requires everyone to have a Google account, and works only inside the Google ecosystem. Downloaded copies (as .xlsx or PDF) have no protection at all.

Common pitfalls

Sharing the file and password in the same email

Defeats the purpose entirely. If your inbox is compromised, both go together. Send the password via a different channel — text, phone call, encrypted messenger.

Assuming sheet protection is real security

It isn't. Anyone determined can strip it. Sheet protection stops honest mistakes, not adversaries.

Using the same password across many workbooks

One leaked file becomes a master key to all the others. Unique password per file, stored in a password manager.

Forgetting to enable "Lock project for viewing" in VBA

The Protection tab has two options: password + Lock. Setting only the password without checking Lock does nothing — anyone can still open the code. Always check both boxes.

Losing the file version that has the working password

If you keep multiple copies (backup, prior version), the passwords may differ. When rotating passwords, update every copy and delete stale ones.

Excel Wizard

Set up the right protection scheme in one step

Deciding which cells to lock, which sheets to protect, and which permissions to allow gets fiddly on complex models. Excel Wizard analyzes your workbook — identifies inputs vs formulas, headers vs data — and applies a coherent protection scheme in one operation.

Install Excel Wizard →

Frequently asked questions

How do I password protect an Excel file to open?

File → Info → Protect Workbook → Encrypt with Password. Enter a strong password, confirm, save. Uses AES-256 in modern Excel — genuinely strong.

What's the difference between opening password and modify password?

Opening password encrypts the file; modify password only prevents saving over it. Modify is easily bypassed with the Read Only button — not real security.

How do I remove a password from an Excel file?

Open the file, File → Info → Protect Workbook → Encrypt with Password → clear the field → OK → save. For sheets or structure, use Review → Unprotect.

What happens if I forget my Excel password?

Opening passwords with strong encryption are essentially unrecoverable. Sheet and structure passwords can be removed with third-party tools. Always use a password manager.

Is Excel password protection safe?

Opening-password encryption in Excel 2013+ is strong (AES-256). Sheet, structure, and VBA passwords are weak — meant to prevent accidents, not attacks.