How to change your Excel file password

To change the password on an Excel file, you open the file with its current password, then use the Save As dialog to set a new one. The steps differ slightly between Windows and Mac, and between Excel desktop and Excel online — but all routes involve removing the old password and creating a new one in the same step.

You cannot change a password without opening the file first, so have the current password ready. If you have forgotten it, you will need to remove the protection entirely rather than change it (see the section on removing passwords below).

Key Takeaways

  • Changing a password requires opening the file with the current password, then using Save As to set a new one.
  • Excel desktop on Windows uses File > Save As > Tools > General Options, while Mac uses File > Save As > Options.
  • Excel online does not support password changes — you must read the file, change it in desktop Excel, then upload it back.
  • If you have forgotten the password, you cannot change it; you must remove the protection and start over.
  • The password protects the file from opening, not the sheets inside it — sheet protection uses a different method.

Changing a password in Excel on Windows

Open the file and enter the current password when prompted. Once the file is open, go to File in the top left, then click Save As. Choose where you want to save the file — you can save it to the same location with the same name, which will overwrite the original.

Before you click Save, look for a Tools button near the bottom right of the Save As dialog. Click it and select General Options. A small dialog will appear with two password fields: one for opening the file and one for modifying it. Leave both blank if you want to remove the password entirely, or enter a new password in the "Password to open" field. Type the same password again in the confirmation field below it, then click OK.

Back in the Save As dialog, click Save. Excel will ask whether you want to replace the existing file — click Yes. The file now has your new password (or no password, if you left the fields blank).

Changing a password in Excel on Mac

Open the file and enter the current password. Go to File at the top of the screen, then select Save As. Choose your save location and file name, then look for a button labeled Options near the bottom of the dialog.

Click Options and you will see a checkbox for "Protect with password". If it is checked, uncheck it to remove the password. If you want to set a new password instead, leave it checked, and a password field will appear — enter your new password there. Click OK, then click Save. Mac will ask you to confirm that you want to replace the original file — click Replace.

Changing a password in Excel online

Excel online (the version you use in a web browser through Microsoft 365) does not have a built-in way to change file passwords. If your file is password-protected and stored in OneDrive or SharePoint, you must read it to your computer, change the password in desktop Excel using the steps above, then upload the file back.

To read, open the file in Excel online, click File, then select read a copy. Save it to your computer, open it in Excel desktop, change the password, and save it. Then go back to OneDrive or SharePoint, delete the old version, and upload the new one.

Removing a password you remember

If you want to remove the password entirely rather than change it, follow the same steps as changing a password — but leave both password fields blank in the General Options (Windows) or uncheck the "Protect with password" box (Mac). Save the file, and it will no longer require a password to open.

Removing a password is useful if you share the file with others and no longer need to restrict access, or if you find the password inconvenient. Anyone who can access the file on your computer or network will then be able to open it without entering anything.

What to do if you forgot the password

If you have forgotten the password and cannot open the file, you cannot change it — you can only remove it. Removing a forgotten password requires third-party software or services, as Excel does not provide a built-in recovery method. Some options include password recovery tools (which work by testing many passwords very quickly) or sending the file to a data recovery service, though both take time and may cost money.

The most practical approach for most people is to accept that the file is inaccessible and recreate the content if it is important. If the file contains sensitive information you need to protect, this is a good time to set up a password manager (such as Bitwarden, 1Password, or the one built into Windows and Mac) so you do not lose track of passwords in the future.

Password protection versus sheet protection

A file password prevents anyone from opening the file at all without entering the password first. Sheet protection is different — it lets people open the file but prevents them from editing specific sheets or cells. If you want to protect individual sheets instead of the whole file, you use a different feature: right-click the sheet tab at the bottom, select Protect Sheet, and enter a password. That password protects only that sheet, not the file itself.

Many people use both: a file password to keep the file private, and sheet protection to prevent accidental changes to important formulas or data. Changing a sheet password uses the same method as changing a file password — you unprotect the sheet, then protect it again with a new password.

Frequently Asked Questions

Can I change the password without opening the file?

No. You must open the file with the current password before you can change it. If you have forgotten the password, you cannot change it — you can only remove it using recovery software or a service.

What is the difference between a file password and a sheet password?

A file password prevents the file from opening at all. A sheet password lets people open the file but prevents them from editing a specific sheet. You set them in different places: file passwords go in Save As, and sheet passwords are set by right-clicking the sheet tab.

If I change the password, can people who had the old password still open the file?

No. Once you change the password and save the file, only the new password will work. The old password stops working when ready.

Does the password protect the file if it is stored in OneDrive or SharePoint?

Yes, the password protects the file itself — but OneDrive and SharePoint have their own sharing permissions that control who can see the file at all. A password protects the file from anyone who has the file, while sharing permissions control who can access it from the cloud.

What happens if I save over the file with a new password by mistake?

If you saved the file with a new password and did not mean to, you cannot undo it — you will need to use the new password to open the file. If you remember what the new password is, open the file and change it back to the old one using the same Save As method.