Excel has two ways to lock a file: password protection and encryption

Password protection stops someone from opening the file without the right password. Encryption scrambles the file's contents so that even if someone copies it, they cannot read it without decrypting it first. Excel lets you do both at once, and the steps differ depending on whether you use Windows or Mac, and which version of Excel you have.

The fastest method on Windows is to save the file, then use File > Info > Protect Workbook > Encrypt with Password. On Mac, the path is File > Properties > Security > Encrypt File Contents. Both take about 30 seconds. If you use an older version of Excel or need to share the file with someone who does, you may need to use a different format or method.

Key Takeaways

  • Windows Excel users can encrypt a file by opening File > Info > Protect Workbook > Encrypt with Password and entering a password twice.
  • Mac Excel users should go to File > Properties > Security and check the box to encrypt file contents, then set a password.
  • Encryption scrambles the file so it cannot be read without the password, even if someone copies it to another computer.
  • If you forget the password, there is no built-in recovery method — write it down or store it in a password manager before you encrypt.
  • Files encrypted in newer Excel versions may not open in older versions unless you save them in a compatible format first.

How to encrypt an Excel file on Windows

Open the Excel file you want to protect. Click the File tab in the top left, then click Info. On the right side of the screen, you will see a button labeled Protect Workbook. Click it, then select Encrypt with Password from the dropdown menu.

A dialog box will appear asking you to enter a password. Type your password in the first field. Type it again in the second field to confirm. Click OK. Excel will close the file and re-save it with encryption applied. The next time you or anyone else opens this file, Excel will ask for the password before showing any data.

If you are using Excel 2010 or earlier, the path is slightly different: go to File > Save As, click Tools in the bottom left of the save dialog, then select General Options. Enter your password in the "Password to open" field and click OK.

How to encrypt an Excel file on Mac

Open the file you want to encrypt. Click File in the menu bar at the top, then click Properties. A new window will open. Look for the Security section and check the box next to "Encrypt file contents." A password field will appear below it.

Enter your password in the field and click OK. Excel will ask you to confirm the password by typing it again. Once you do, click OK again. The file is now encrypted. When you or someone else tries to open it, Excel will prompt for the password.

On older Mac versions of Excel (2011 and earlier), use File > Save As instead. In the save dialog, look for a checkbox labeled "Encrypt file contents" and check it before saving.

What happens when someone tries to open an encrypted file

When an encrypted Excel file is opened, the person opening it sees a password prompt before the spreadsheet appears. They must type the correct password to proceed. If they enter the wrong password, Excel will not open the file and will ask them to try again.

This works the same way whether the file is opened from a USB drive, email attachment, cloud storage, or a shared network folder. The encryption is tied to the file itself, not to where it is stored.

Removing or changing the password on an encrypted file

To change the password, open the file (you will need to enter the current password). Then follow the same steps you used to encrypt it: on Windows, go to File > Info > Protect Workbook > Encrypt with Password. On Mac, go to File > Properties > Security. Enter your new password and confirm it. Click OK.

To remove the password entirely, follow the same steps but leave the password field blank when prompted. Click OK without entering anything. The file will no longer be encrypted.

Compatibility issues with encrypted Excel files

Excel files encrypted in newer versions (Excel 2016 and later) may not open in older versions like Excel 2010 or Excel 2007. If you need to share an encrypted file with someone using an older version, save the file in .xls format (the older Excel format) before encrypting it. This reduces compatibility issues, though very old versions may still have trouble.

Files encrypted in Excel for Mac can usually be opened in Excel for Windows and vice versa, as long as both users have a reasonably recent version of Excel. If someone cannot open your encrypted file, ask them what version of Excel they have and consider saving it in an older format.

What to do if you forget your password

Excel does not have a built-in password recovery or reset feature. If you forget the password to an encrypted file, there is no official way to recover it. The file will remain locked.

Before you encrypt a file, write down the password and store it somewhere safe — a password manager like Bitwarden, 1Password, or KeePass is ideal. If you use a password manager, you can retrieve the password later if you need to open the file again or change the encryption settings.

Encryption versus other ways to protect an Excel file

Excel offers several protection options beyond encryption. You can protect specific sheets so that users cannot edit certain cells without a password, or you can protect the entire workbook structure so users cannot add or delete sheets. These options do not encrypt the file — they just restrict what users can change.

Encryption is the strongest option because it makes the file unreadable without the password. Sheet and workbook protection can be bypassed more easily by someone with technical knowledge. If your file contains sensitive data, encryption is the better choice.

You can also use cloud storage services like OneDrive or Google Drive, which offer their own encryption and sharing controls. However, these do not replace file-level encryption — they work alongside it.

Frequently Asked Questions

Can I encrypt an Excel file that is already shared with others?

Yes. Open the file, encrypt it with a password, and save it. The next time someone tries to open the shared copy, they will need the password. You will need to tell them the password separately — it is not sent automatically when you encrypt the file.

Does encryption slow down Excel or make the file larger?

Encryption adds a small amount of processing time when you open or save the file, but it is usually not noticeable on modern computers. The file size does not increase significantly. The encryption overhead is typically less than 1% of the file size.

Can I encrypt an Excel file that contains macros or formulas?

Yes. Encryption works on any Excel file, regardless of what it contains. Macros, formulas, and all other content are encrypted along with the rest of the file. The file will function normally once it is opened with the correct password.

What if I need to encrypt multiple Excel files at once?

Excel does not have a batch encryption feature. You will need to encrypt each file individually by opening it and following the encryption steps. If you have many files to encrypt, consider using a third-party tool or script, though this requires technical knowledge.

Is Excel encryption as secure as encrypting a file with Windows or Mac built-in tools?

Excel encryption uses standard encryption methods and is reasonably secure for most purposes. However, dedicated encryption tools like BitLocker (Windows) or FileVault (Mac) may offer stronger security for highly sensitive data. For typical business use, Excel encryption is sufficient.