How to Password Protect Google Sheets [Easiest Method]
When considering how to secure files and accounts, adding a password for access is often the first thought. Although Google Sheets does not have this as a default feature, it can be achieved using Google Apps Script. Learn how to achieve this by following this tutorial.
Can I Password Protect Google Sheets?
At first glance, it may seem impossible to password-protect a Google Sheets spreadsheet. This is because Google Sheets does not have a built-in password feature. Instead, it has a Share feature that allows you to control which Google accounts have access to the data.
However, as we have seen in other tutorials, you can add additional features to google sheets using Google Apps Script. This is what we will use in this tutorial.
Why provide an additional layer of protection?
Certain sheets may contain sensitive data such as login information, bank information, earnings, etc. if the account used is shared, adding this kind of functionality to the Google Sheets spreadsheet will make sure that even if the account is compromised, there is still a layer of protection that keeps the data from being accessed.
How to Protect Google Sheets with Password
Step 1: Open the Google Sheets template
Click the link below to open the template:
Step 2: Copy the template to your Google Sheets
The link prompts you to make a copy the sheet alongside its Apps Script files and functionality. Click Make a copy.

Step 3: Open Google Sheets Apps Script
To open Google Apps Script, click Extensions on the main toolbar then select Apps Script.

Step 4: Start New deployment
Click the arrow besides the Deploy button, then select New deployment

Step 5: Deploy the Script
A box will appear allowing you to configure the deployment. We can opt not to modify these settings. Click Deploy.

Step 6: Authorize Access to Apps Script
As you will run the script for the first time, Google Apps Script will prompt you to Authorize Access to the script. Click Authorize access.

A new window will appear, prompting you to select the Google account to authorize. Select your account.

A page will load, inform you that the app has not been verified by Google. This app is however safe.

Click Advanced, then click Go to ProtectedSheet.

You will be brought next to the page containing lists of permissions required to run the app. Click Allow.

Step 7: Click Done
The window will close and you will be brought back to the New deployment box. Click Done.

Step 8: Click Protect File, then Initialize

A small box labeled Finished script indicates that the script has been initialized. We are now ready to add contents to this spreadsheet and encrypt it.

You can now start adding data to the spreadsheet. It is best to store the data starting at Row 3. You will see in the next section why.

Set a Password to Encrypt Data
When you encrypt the data for the first time, you will be asked to supply a password. Here are the steps:

Step 1: Click Protect File
Step 2: Select Encrypt File

Step 3: Set a new password

Step 4: Click Ok
The data will become encrypted starting Row 3.

The same steps are still applicable if you want to encrypt data again.

How to Unlock/Decrypt Data
Here are the steps to decrypt the data:
Step 1: Click Protect File
Step 2: Select Decrypt File

Step 3: Enter the Password


Step 4: Click Enter.
You will see the data decrypted in action.

How to Change Password
Doing this process can be a necessity, especially if there are changes to those who access the accounts. Here are the steps to replace the old one with a new one.
Step 1: Click Protect File
Step 2: Select Change Password

Step 3: Replace the old one with a new one

Step 4: Click Submit
Follow the steps to encrypt the data in the previous sections to activate the new settings.
