Skip to content

This guide isn’t available in 日本語 yet, so we’re showing the original English version.

Microsoft 365

How to Password Protect an Excel or Word File

In Word or Excel, go to File > Info > Protect Document (or Protect Workbook) > Encrypt with Password and set a password. Anyone opening the file then needs it. You can also allow opening but restrict editing.

Updated
Time
3 minutes
Difficulty
Easy
Applies to
Windows, Mac

By Published Oct 6, 2026

Quick answer

  1. 1 Open the file in Word or Excel.
  2. 2 Click File > Info > Protect Document / Protect Workbook > Encrypt with Password.
  3. 3 Type a strong password, confirm it and save the file.
  4. 4 Mac: Review > Protect Document (or Protect Workbook / File > Passwords).
  5. 5 Store the password safely: Microsoft can’t recover it.
On this page
  1. Before you start
  2. Windows: encrypt with a password
  3. Mac
  4. Allow opening but restrict editing
  5. Troubleshooting
  6. Frequently asked questions

Before you start

  • Microsoft Word or Excel (desktop)

Method 1 Windows: encrypt with a password

  1. Step 1: Open File > Info

    Open the document or workbook and click File > Info.

  2. Step 2: Encrypt

    Click Protect Document (Word) or Protect Workbook (Excel) > Encrypt with Password.

  3. Step 3: Set the password

    Type a strong password, confirm it, and click OK. Save the file.

Method 2 Mac

  1. Step 1: Word

    Go to Review > Protect Document (or Protect), enter a password under Set a password to open this document, and click OK.

  2. Step 2: Excel

    Go to File > Passwords (or Review > Protect Workbook), enter a Password to open and save.

Method 3 Allow opening but restrict editing

Editing restrictions are easy to get around and aren’t security; use Encrypt with Password for privacy.

  1. Step 1: Word

    Review > Restrict Editing: choose what people can do (e.g. comments only) and click Yes, Start Enforcing Protection with a password.

  2. Step 2: Excel

    Review > Protect Sheet or Protect Workbook to stop changes to cells or structure.

Troubleshooting

The option is greyed out

The file may be in an older format (.doc/.xls) or opened read-only. Save as .docx/.xlsx and try again.

Opening in the browser doesn’t work

Word and Excel for the web can open encrypted files in recent versions, but some features require the desktop app.

Frequently asked questions

Is Office password encryption secure?

Modern Office files use strong AES encryption. Security depends on a strong password.

Can I protect a file on my phone?

The mobile apps can open encrypted files, but setting passwords is easiest on a computer.

Summary

Use File > Info > Protect Document/Workbook > Encrypt with Password on Windows, or Review > Protect on Mac, and keep the password safe. Use editing restrictions only for convenience, not security.

Sources

Written by

James Chambo

Founder

James is the Founder and Senior Editor of OnlineHow with more than 20 years of experience in internet publishing.