Unfortunately there is currently no way to password protect a Google Document natively in Drive, but you can achieve the same using the password protected Google Spreadsheet which uses Google Scripts. Here's how to use it.

  1. Open and make a copy of the ProtectedSheet Google spreadsheet. You can rename it to any name you want.
  2. Next select Tools->Script Editor. This will bring up a script in a new window or tab.
  3. In this window, select File->Manage Versions and click on Save a new version. You can leave all fields blank. A new row for version 1 will appear. Just click OK button.
  4. Now select Publish->Deploy as webapp and click on the Deploy button.
  5. You will now be shown a confirmation that you app has been deployed as a web app.
  6. Now close this window and come back to the spreadsheet tab or window. You will find a new menu item Protect File in the spreadsheet. Select Protect File->Initialize and provide required permissions.

    All the above steps are one time only. You have now fully setup your password protected document.

  7. Now you can add what ever you want to store securely into the document. Just make sure you leave the first two coloured rows intact.
  8. To secure the document, select Protect File -> Encrypt File. You will be asked to enter a password. Once done, this will scramble the content each cell in the document. Now your data is fully password protected and nobody can read it without having the password you have set.

    NOTE: This password is not your Google account password, but any password you can choose. The first time you run "encrypt", you will be asked to set a password which will be used for all further encrypt/decrypt requests.

  9. When ever you want to decrypt your document, open it and select Protect File -> Decrypt File. You will be again asked for the password giving which it will decrypt and bring back the cell contents which you can read or edit.


This works well if you are opening the spreadsheet in a PC. But if you are opening it from a phone, Google always loads the phone version and you won't get the Protect File menu. To encode/decode your spreadsheet from a phone, click on the encrypt/decrypt URL which will be present in the first row. This URL gets created and added once you deploy the web app in Step 4 above.


On loading the URL will show a web page where you can enter your password to encrypt or decrypt the document. Once done, a Go back link will appear which you can click to load the encrypted/decrypted spreadsheet.




You can also change the password at any time using Protect File -> Change Password menu option. Please make sure you don't edit and change the encrypted document. If you do so, the decryption won't be able to give back the original content. And as always, the script is your local copy and runs entirely in your Google account. Nobody else has access to anything including the password you set.



How it works.


On clicking the encrypt menu, the script checks the password with what you have set. Only if it matches, the contents of the Spreadsheet is read and text in each cell is obfuscated. On clicking Decrypt, the same algorithm converts the obfuscated text back to the original text if the password matches.


Finally, here's a video to see Google document password protection in action.





Please Note: This may not be the most secure method of securing your data and should only be used to prevent casual viewing of your data, it probably will not defeat a dedicated hacker. 

How to best keep your Google type files secure
  1. Use two-step verification on your Google Account
  2. Set a screen lock for your mobile device. Check out Android here and iOS here
  3. If you use an iOS device, put a passcode on the Google Drive app
  4. Create a separate account for files that are extremely sensitive if you are concerned about the security on your primary account
  5. Understand sharing settings for Google Drive and keep your files private (only you can access)
  6. Make sure you have a strong password on computers you authorize Google to trust