In this article:

How to Password Protect Your Spreadsheet (2025 Guide)

April 18, 2025

When thinking about how to secure files and accounts, adding a password is often the first idea. While many spreadsheet tools don’t include this as a default feature, it’s still possible to create a password-like layer of protection using built-in scripting or automation tools.

Why provide an additional layer of protection?

Some spreadsheets contain sensitive information like logins, financial details, or earnings. If the account is shared or ever compromised, having an extra layer of protection helps ensure the data isn’t easily accessed.

How to Protect Your Sheet With a Password

Step 1: Open the Spreadsheet Template

Click the link below to open the template:

https://docs.google.com/spreadsheet/ccc?key=0Aize8AsQfYPJdGstX2toS3JzLXJFNEQ2VC1xaUE0enc&newcopy=true 

Step 2: Make a Copy

You’ll be prompted to create a copy of the spreadsheet. Doing so will also copy any associated scripts that handle the protection features.

Step 3: Open the Script Editor

Go to the menu bar, click on Extensions or a similar menu, and select the script editor to open the scripting environment.

Step 4: Start New deployment

Click the dropdown next to the Deploy button and select New deployment.

Step 5: Deploy the Script

A dialog will appear with configuration settings. You can use the default settings. Click Deploy.

Step 6: Authorize Access to Apps Script

You'll be prompted to authorize access to run the script. Click Authorize access

Choose your account and proceed, even if a warning appears saying the app isn’t verified.

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: Complete the Setup

Once authorized, you’ll be returned to the deployment window. 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.

Data added to the sheet

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

Initial data, unencrypted

Step 2: Select Encrypt File

Step 3: Set a new password

Create a new password box

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. 

Enter your password to encrypt data

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

Enter password to decrypt
Message if incorrect phrase is entered

Step 4: Click Enter.

You will see the data decrypted in action.

Decrypted data

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

Change password box

Step 4: Click Submit

Follow the steps to encrypt the data in the previous sections to activate the new settings.

Data after encrypting it again

Related Articles

How to Insert Bulleted or Numbered Lists in Google Sheets
How to Convert Numbers to Strings (2025 Guide)

Turn PDFs into spreadsheet tables with AI

Use Lido to extract data from contracts, invoices, financials, and more in seconds. Save time, reduce errors.
  • No credit card required
  • 20 free pages