How to Password Protect an Excel File

Encrypt an Excel file with a password, test access, remove protection safely, and choose the right control for editing, sheets, and sharing.

Excel can require a password before it reveals a workbook’s contents, but only if you use the correct protection command. Excel also has similarly named options for locking cells, protecting worksheet tabs, and discouraging edits. Those controls solve different problems.

For access control, use Encrypt with Password. It encrypts the workbook and requires the password before the file opens. The workflow below shows how to apply it, verify that it works, remove it later, and avoid the common mistake of protecting the sheet instead of the file.

Menu paths use current desktop Excel for Microsoft 365 and recent perpetual versions. Labels can vary slightly on Mac and in older releases. Password protection should be added and tested in the desktop app.

Choose the protection that matches the risk

Start with the outcome you need. A password to open is appropriate when possession of the file should not be enough to read its contents. It is not the best tool for every editing or collaboration problem.

What you need Excel or Microsoft 365 control What it actually does
Require a secret before the file opens Encrypt with Password Encrypts the Excel file and prompts for the password when it is opened.
Keep formulas or fixed cells from being changed Protect Sheet Controls which actions are allowed on a worksheet; it does not secure confidential data.
Stop sheets from being added, deleted, moved, hidden, or renamed Protect Workbook on the Review tab Protects workbook structure, not access to the file.
Let named people view or edit a cloud workbook OneDrive or SharePoint permissions Controls access through accounts and sharing links; the owner can change those permissions later.
Signal that a finished file should not be edited Mark as Final or read-only recommendation Discourages changes but can be reversed by a recipient.

The names are easy to confuse because Protect Workbook appears in more than one part of Excel. On File > Info, it opens a menu that includes file-level choices such as Encrypt with Password. On the Review tab, Protect Workbook normally refers to the workbook’s sheet structure.

Microsoft’s overview of protection and security in Excel explains these file, workbook, and worksheet levels.

Prepare the workbook before encrypting it

Encryption controls who can open the file. It does not clean the workbook or limit what an authorized recipient can see after opening it. Before setting a password:

  • Review every worksheet, including hidden sheets, rows, and columns.
  • Check comments, notes, document properties, named ranges, external links, queries, and cached source data.
  • Remove personal or confidential information that the recipient does not need.
  • Save a separate backup in a controlled location before changing protection settings.
  • Decide who must retain the password and how it will be recovered if the owner is unavailable.

Use a long, unique password or passphrase that is not reused for email, banking, or other accounts. A reputable password manager can generate and store it. General NIST password guidance emphasizes length, avoiding common or compromised choices, and supporting password managers.

Microsoft cannot retrieve a forgotten Excel file password. Store the password securely before you depend on the encrypted copy, and never keep the only record inside the workbook it unlocks.

Password protect an Excel file on Windows

The most direct path in current desktop Excel is through the workbook information screen:

  1. Open the workbook in desktop Excel.
  2. Select File > Info.
  3. Select Protect Workbook > Encrypt with Password.
  4. Enter the password, then select OK.
  5. Enter the same password again in the confirmation box and select OK.
  6. Save the workbook.
  7. Close Excel completely, reopen the file, and confirm that Excel asks for the password before showing the workbook.

The password is case-sensitive. Typing the same letters with different capitalization will not open the file. Microsoft documents the supported command path and recovery warning in Protect an Excel file.

If Encrypt with Password is not where you expect

First confirm that the workbook is open in the desktop app, not only in a browser preview. In some Excel versions, file-password options are also available from the Windows Save As dialog under Tools > General Options.

Choose Password to open when the goal is to block access to the file.

Do not substitute Password to modify without understanding the difference. That setting can let a recipient open the workbook without the editing password and save a separate copy. It is an edit workflow, not equivalent to encrypting the file against viewing.

Password protect an Excel file on Mac

In current Excel for Mac, open File > Passwords. The Password to open field controls access to the file; Password to modify is a separate editing option.

  1. Open the workbook in Excel for Mac.
  2. Select File > Passwords.
  3. Enter the password in Password to open, then enter it again in the verification field.
  4. Save and close the workbook.
  5. Reopen it and test the password prompt before distributing the file.

Microsoft’s Excel for Mac file-password guide also distinguishes a password to open from read-only and password-to-modify settings.

If Windows and Mac users will exchange the workbook, test the final encrypted file on the versions they actually use. This catches menu, password, or file-format compatibility problems before the original is removed or the workbook is sent.

Verify the protected file before sharing it

Seeing a protection label inside Excel is not enough. A short acceptance test proves that the saved file behaves as intended:

  1. Confirm that the workbook has finished saving.
  2. Close every Excel window that has the workbook open.
  3. Open the saved file from its actual storage location.
  4. Check that the workbook does not display before a password is entered.
  5. Try the intended password and verify that the workbook opens normally.
  6. When practical, test a copy using the recipient’s operating system and Excel version.

If the file opens without a password, you may have protected a worksheet or workbook structure instead of encrypting the file. Return to File > Info > Protect Workbook and look specifically for Encrypt with Password.

Share the file and password separately

Encryption is undermined if the workbook and its password travel together. For a sensitive workbook, send the file through one approved channel and communicate the password through another. For example, share the file through an access-controlled company storage service and provide the password through an approved password manager or a separate communication channel.

Keep the audience as small as the task allows. A password is shared knowledge: everyone who receives it can pass it on, and Excel cannot tell one password holder from another. If you need named-user access, expiration, auditability, or the ability to revoke access later, use organizational OneDrive, SharePoint, sensitivity-label, or rights-management controls where available.

Password protection also does not stop an authorized person from copying values, taking screenshots, exporting content, or forwarding an opened copy. Remove unnecessary sensitive data before sharing, even when the file is encrypted.

Change or remove the file password

You must know the current password to open the workbook before you can change or remove it.

Change the password

  1. Open the encrypted workbook and enter its current password.
  2. Go to File > Info > Protect Workbook > Encrypt with Password.
  3. Replace the existing entry with the new password.
  4. Confirm the new password, save, close, and reopen the workbook.
  5. Verify that the old password fails and the new password succeeds.

Remove the password

  1. Open the workbook with its current password.
  2. Return to File > Info > Protect Workbook > Encrypt with Password.
  3. Delete the password from the box so it is empty, then select OK.
  4. Save and close the workbook.
  5. Reopen it and confirm that there is no password prompt.

Removing or changing the password affects the copy you save. It does not alter older copies that have already been emailed, downloaded, or stored elsewhere.

Add editing controls only when they solve another problem

File encryption and editing controls can be used together. For example, a financial workbook may require a password to open and also use sheet protection so reviewers can change assumptions without overwriting formulas. Apply each control for its own purpose:

  • Protect Sheet: unlock the intended input cells, then protect the worksheet to restrict changes elsewhere.
  • Protect Workbook: protect the structure when sheet tabs should not be inserted, deleted, moved, hidden, or renamed.
  • Cloud permissions: grant view or edit access to identified people when the workbook is stored in OneDrive or SharePoint.
  • Version history and backups: preserve recoverable copies because protection does not replace recovery planning.

Microsoft states that worksheet protection is not a security feature; it is designed to prevent changes to locked cells. Likewise, workbook protection controls the sheet structure rather than who can open the file.

Troubleshoot common protection problems

Problem Likely cause What to check
The file opens without asking for a password Only the sheet or workbook structure was protected, or the change was not saved. Use Encrypt with Password, save, close all open copies, and test again.
The correct-looking password is rejected Capitalization, keyboard layout, spaces, or a copied character may differ. Check Caps Lock and the active keyboard layout, then enter the case-sensitive password carefully.
A colleague can read the file but cannot edit it The workbook may be opened read-only, marked final, restricted by permissions, or locked by another editor. Inspect the title bar, message bar, sharing permissions, and workbook status instead of changing encryption blindly.
Sheet tabs cannot be renamed or moved The workbook structure is protected. Use Review > Protect Workbook and provide the structure password if prompted.
Locked cells can still be edited The cells are marked Locked, but sheet protection has not been enabled. Finish the setup with Review > Protect Sheet.

Frequently asked questions

Does Protect Workbook stop people from opening the file?

Not when you select Protect Workbook on the Review tab. That command protects the arrangement of worksheet tabs. To require a password before the file opens, use File > Info > Protect Workbook > Encrypt with Password.

Can Microsoft recover a forgotten Excel file password?

No. Microsoft says it cannot retrieve forgotten Excel file passwords. Keep a protected record of the password and an appropriate backup of the workbook.

Is Mark as Final the same as password protection?

No. Mark as Final makes the workbook read-only and signals that editing should stop, but a recipient can remove that status. Microsoft explicitly describes Mark as Final as not being a security feature.

Should I email the password with the workbook?

For sensitive data, no. Sending both together means anyone who gains access to that message has the file and the key. Use separate approved channels and share both only with the intended recipients.

Does encryption hide formulas and worksheets after the file opens?

No. Once an authorized person opens the workbook, file encryption no longer limits what that person can see inside it. Use worksheet and workbook-structure controls to reduce accidental changes, and remove information recipients should not receive.

Protect access first, then test the result

Use Encrypt with Password when the file itself must not open without a secret. Keep that password recoverable, save the workbook, close it, and prove the prompt appears before sharing. Add sheet, structure, or cloud-permission controls only when you also need to manage editing or named-user access.