|

How To Password Protect A Word Or Excel File (2026)

To password protect a Word or Excel file, open File, select Info, and choose Encrypt with Password.

The option sits under Protect Document in Word and under Protect Workbook in Excel.

The steps and warnings below come from Microsoft’s support pages for both apps.

Quick answer: where Encrypt with Password is

AppPath
WordFile > Info > Protect Document > Encrypt with Password
ExcelFile > Info > Protect Workbook > Encrypt with Password

Read this before you set a password

Microsoft says it cannot recover a forgotten password for an encrypted Excel file.

Its Excel help also says that if you lose the password, you cannot open or gain access to the password-protected workbook.

Its Word page gives the matching advice to keep a copy of the password in a safe place if you think you might forget it.

Store the password somewhere safe before you close the file, such as in a password manager.

This guide only covers adding a password to your own file.

Password protect a Word document

  1. Open the document in Word.
  2. Select File, then Info.
  3. Select Protect Document.
  4. Choose Encrypt with Password.
  5. Type a password and select OK.
  6. Type the same password again and select OK to confirm.
  7. Save the file.

Microsoft notes the password only takes effect once the file is saved.

Password protect an Excel workbook

  1. Open the workbook in Excel.
  2. Select File, then Info.
  3. Select the Protect Workbook box.
  4. Choose Encrypt with Password.
  5. Enter a password in the Password box and select OK.
  6. Enter it again in the Reenter Password box and select OK.
  7. Save the workbook.

Microsoft’s page covers Excel for Microsoft 365, Excel 2024, Excel 2021, Excel 2019 and Excel 2016.

Password rules Microsoft gives

RuleWord pageExcel page
Case-sensitiveYesYes
LengthUp to 15 charactersNo length or character requirements
AdviceUse a strong password you can still rememberPick one you will remember

Because passwords are case-sensitive, check that Caps Lock is off when you type it both times.

What Encrypt with Password does

Microsoft describes file encryption as setting a password that stops other people from opening the file.

It calls this the most common technique for keeping others out of an Excel file.

It is different from the sheet and workbook protection on the Review tab, which control editing instead of opening.

The three protection levels in Excel

LevelWhat it controls
FileWho can open or edit the whole file
WorkbookThe structure, so people cannot add, move, delete, hide or rename sheets
WorksheetWhat people can change inside one sheet, such as locked cells and formulas

Microsoft states that worksheet protection is not a security feature.

It only stops people from changing locked cells, and it does not stop them from viewing the data.

If the goal is to keep a file private, use Encrypt with Password.

Lock the workbook structure with a password in Excel

Use this when people may open the file but must not rearrange its sheets.

  1. Select the Review tab.
  2. Select Protect Workbook.
  3. Enter a password in the Password box.
  4. Select OK, enter the password again to confirm, and select OK.

The password here is optional, but Microsoft says that without one any user can unprotect and change the workbook.

With the structure locked, other people cannot view hidden worksheets or add, move, delete, hide or rename worksheets.

Microsoft repeats the same warning for this password, saying Excel cannot recover it for you.

What the Review tab protection buttons do

Button in the Protect groupMicrosoft’s description
Protect SheetProtects the worksheet and the contents of locked cells
Protect WorkbookProtects the workbook structure and windows
Allow Edit RangesSets which ranges can be edited

How to tell a workbook is already protected

  • On the Review tab, the Protect Workbook icon is highlighted.
  • Sheet tab commands such as Insert, Delete, Rename, Move, Copy, Hide and Unhide are unavailable.
  • File > Info shows the status next to Protect Workbook.

Other file-level options in Excel

OptionWhat it is forRequirement
Open and modify passwordsOne password to open and another to modify, for read-only and edit accessNone listed
Mark as FinalFlags the file as the final version and discourages changesNone listed
Restrict AccessApplies Information Rights Management permissionsYour organization must have IRM set up
Digital signatureAdds a signature to the fileA valid certificate from a certificate authority

Which level to use

  • Encrypt the file when only certain people should be able to open it, such as a status report for your team.
  • Use separate open and modify passwords when some people should read and others should edit.
  • Protect the workbook structure when each person edits their own sheet and nobody should add or delete sheets.
  • Protect a worksheet when people enter data but must not delete rows, columns or formulas.

Microsoft says the levels can be combined, such as encrypting a shared file and also turning on workbook and worksheet protection.

A personal workbook might only need worksheet protection to avoid deleting formulas by accident.

Be careful when sharing a protected file

Microsoft warns that a password does not guarantee security.

Sharing the file or the password carries risk, because people you did not intend could get the password.

It advises thinking carefully before sharing workbooks that hold sensitive details such as credit card numbers, Social Security numbers or employee IDs.

Send the password separately from the file, and not in the same email.

Check that the password works

  1. Save and close the file.
  2. Open it again from File Explorer.
  3. Enter the password when the app asks for it.

Do this once before you delete any unprotected copy.

Sources

Leave a Reply

Your email address will not be published. Required fields are marked *