How to password protect a Word document or Excel file (so it needs a password to open)

You want a Word document or an Excel workbook that nobody can open without a password. Word and Excel can do this themselves with Encrypt with Password, which really encrypts the file. Several other "protect" options look similar but only limit editing. Here are Microsoft's current steps, what each option does, and what to watch out for.

Short answer: in Word, select File → Info → Protect Document → Encrypt with Password; in Excel, File → Info → Protect Workbook → Encrypt with Password. Type a password, confirm it and save. The file then can't be opened without that password. Protect Sheet, Restrict Editing, Mark as Final and the Review tab's Protect Workbook don't encrypt anything. Microsoft can't recover a forgotten password.

Password protect a Word document

  1. Open the document and go to File → Info → Protect Document → Encrypt with Password.
  2. Type a password and select OK, then type it again and select OK.
  3. Save the file. Microsoft says this makes sure the password takes effect.

Microsoft gives these steps for Word for Microsoft 365, Word 2024, 2021, 2019 and 2016. They're the same on Windows 11 and Windows 10; what matters is the Word version. On a Mac, use Review → Protect → Protect Document and set a password to open under Security.

Password protect an Excel file to open

  1. Select File → Info.
  2. Select the Protect Workbook box and choose Encrypt with Password.
  3. Enter a password in the Password box and select OK.
  4. Enter it again in the Reenter Password box, select OK, and save the workbook.

Microsoft says Excel places no restrictions on password length, characters or numbers, and passwords are case-sensitive. One exception: passwords in Excel for Mac and Word for Mac are limited to 15 characters, and a file protected on Windows with a longer password can't be opened there. Close and reopen the file to check that it asks for the password.

In a browser: Microsoft says Word for the web can't password-encrypt a document or edit one that's encrypted, and that passwords can't be added, changed, removed or recovered in Excel for the web. Use Open in Word or Open in Excel to do it in the desktop app.

What each option can and can't do

OptionWhereWhat it doesStops people reading the file?
Encrypt with PasswordFile → Info → Protect Document or Protect WorkbookEncrypts the file; it needs the password to openYes
Protect Sheet (Excel)Review → Protect SheetStops changes to locked cells. Microsoft: "Worksheet level protection isn't intended as a security feature."No
Protect Workbook (Excel)Review → Protect WorkbookLocks the structure: stops adding, moving, deleting, hiding or renaming sheets and viewing hidden onesNo
Restrict Editing (Word)Review → Protect → Restrict EditingMakes the document read-only except parts you allow; its password lets people remove the protectionNo
Mark as FinalFile → Info → Protect → Mark as FinalMakes the file read-only. Microsoft: "not a security feature"; anyone can remove itNo
Clavis EncryptThe Clavis Encrypt appEncrypts any file, Office or not, and hides its real nameYes

Microsoft's Excel overview also warns: "You should not assume that just because you protect a workbook or worksheet with a password that it is secure."

Can I password protect one Excel sheet from viewing?

Not on its own: the password to open covers the whole file. You can hide the sheet and then protect the workbook structure with a password, which Microsoft says stops others from viewing hidden worksheets in Excel. But that's protection against changes, not encryption, and the warning above applies. To keep one sheet private, move it into a separate workbook and encrypt that file with a password.

What encryption Word and Excel use

Microsoft's help pages don't name the algorithm, but its file-format specification for Office encryption (MS-OFFCRYPTO) describes it. Today's .docx and .xlsx files use what it calls ECMA-376 document encryption, based on AES. Microsoft's IT documentation for Office 2016 gives the defaults as AES with a 256-bit key in CBC mode; it doesn't say whether newer versions changed them.

Older formats are a different story. When the older binary .doc and .xls formats are encrypted, the specification says RC4 encryption or XOR obfuscation is used. It calls one RC4 method "insecure" and the other "easily reversible", and recommends neither for sensitive material. So save as .docx or .xlsx before you add a password.

How to remove the password

You need the current password. In Word, open the document and enter its password, go to File → Info → Protect Document → Encrypt with Password, clear the Password box and select OK. In Excel, it's File → Info → Protect Workbook → Encrypt with Password; clear the asterisks and select OK. Then save.

What can go wrong

  • A forgotten password locks you out. Microsoft says Word "won't be able to recover it for you" and that Microsoft "cannot retrieve forgotten passwords". At work, IT may be able to help only if it set up Microsoft's DocRecrypt tool before you created the password.
  • Sharing the password. Send it separately from the file, by a call or a text, never in the same email. Microsoft warns that passwords can fall into the wrong hands when you share them.
  • The file name still shows. Salaries 2026.xlsx tells anyone who sees the folder or email what it is.
  • Earlier copies aren't protected. Copies you emailed, backed up or synced before adding the password stay readable.
  • Old formats. A .doc or .xls file gets the weak older encryption described above.

Where Clavis Encrypt fits

Office's own encryption is the right tool when someone needs to open the file in Word or Excel. Clavis Encrypt helps with the rest: files that aren't Office documents (PDFs, scans, photos, ZIPs), files you keep on your own PC, and files whose names give too much away. It encrypts the whole file with AES-256-GCM, with a key derived from your password by Argon2id, gives the encrypted file a random name with the real one stored inside, checks for tampering when you decrypt, and gives you a recovery key in case you forget your password. Choose a file (or several) and press Encrypt; that's free on Windows 10 and 11 and Linux. Encrypting whole folders in one step is Pro ($19 once). Clavis replaces the original with the encrypted file. To edit it, decrypt it again, or with Pro use Open: the file opens in Word or Excel from a temporary working copy and is locked again when you're done. To send a locked copy to someone without Clavis, see encrypting files before emailing them. Clavis is closed source and hasn't been independently audited; its file format is public, with an open-source decryptor.

Questions

How do I password protect an Excel file so it needs a password to open?

Select File, then Info, select the Protect Workbook box and choose Encrypt with Password. Enter the password, confirm it and save. Protect Sheet and the Review tab's Protect Workbook don't do this; they only limit changes.

How do I password protect a Word document in Windows 11?

In Word, go to File, then Info, then Protect Document, then Encrypt with Password. Type the password twice and save the file. The steps depend on your Word version, not on Windows 11 or 10.

Can I password protect one Excel sheet from viewing?

Not separately. You can hide the sheet and protect the workbook structure, but Microsoft says not to assume that's secure. Move the sheet into its own workbook and encrypt that file instead.

Is Protect Sheet the same as encrypting the file?

No. Microsoft says worksheet protection isn't intended as a security feature: it only stops changes to locked cells. Anyone can still open and read the workbook.

I forgot the password to my Word or Excel file. Can Microsoft unlock it?

No. Microsoft says it can't retrieve forgotten passwords. In an organization, IT can help only if it set up the DocRecrypt tool before the password was created.

How do I remove the password from a Word or Excel file?

Open the file with its password, go to File, Info, Protect Document (or Protect Workbook), Encrypt with Password, clear the password box, select OK and save.

Can I add a password in Word or Excel for the web?

No. Microsoft says Word for the web can't password-encrypt documents, and Excel for the web can't add, change or remove passwords. Open the file in the desktop app.

Sources

Last checked against Microsoft's documentation on November 11, 2026. Menus can change between Office versions; what your own Word or Excel shows is the final word.

Related: password-protecting a PDF on Windows, password-protecting a ZIP file on Windows 11 and password-protecting a folder on Windows.

Encrypt any file with Clavis Encrypt — free