For the longest time, web-based text processors weren’t primary work and education options but Google Docs changed the narrative. Millions of users write, edit, and share important documents online and store them in the cloud. Many of them are wondering
if they can make a Google Doc view only so no collaborator (or themselves) can make any changes. We made sure to answer the question below. This question gets two answers — one if you’re the one who’s accessing the document and the other if you share the document and it’s accessed by others. You can protect a Google Doc from editing it yourself on your PC as it’s already View Only on smartphone apps. On Android and iOS, Google Docs
are always View Only unless you tap the Edit button (pencil icon). This is different on PC where you need to choose the mode from View > Mode. Just select Viewing and you are good to go. On the other hand, if you are sharing the document and don’t want your collaborators to change anything, you can do that in the sharing menu. There’s an option to choose between Commenter, Editor, and Viewer. As the description implies,
Commenters can only leave comments on the document, Viewers are limited to only viewing it, and Editors have the same permission as you do. Here’s how to protect a shared Google Doc from editing by others on your Android: The procedure is similar on your PC.
Once you click File > Share and choose the collaborator, you get to choose the level of permission they have. You can always revoke access and change permissions in the Share menu in each document. And, that should do it. Thank you for reading and we hope that this article answered your questions. In case you have something to add to the conversation,
feel free to share your thoughts in the comments section below. If you just learned something new about your phone, and want more of that, subscribe to our newsletter. We guarantee 100% privacy. Your name/email address will never be shared.How do I protect a Google Doc from editing?
Subscribe to our Newsletter
Your documents and files in Google Drive can be modified by anyone who has edit access to the file. Learn how to freeze a document and prevent anyone from editing your files.
The files in your Google Drive are private by default and only the owner has initial permissions to view, edit or delete their files. If you choose to share a file with other people, you can decide whether others have read-only access to your files or if they are allowed to edit and comment on your files.
You can always remove external collaborators from your documents to prevent them from editing your files but how do you prevent yourself (the owner) from accidentally editing your own files in Google Drive?
How to Prevent Document Edits in Google Drive
Google Drive now has a new Locking API to help developers easily add content restrictions on documents, spreadsheets, presentations, PDF and any other file in Google Drive.
When you lock a file, no one (including the owner) can make edits to the file, the file title cannot be changed and also lose the option of commenting inside files.
Google Drive doesn’t have a simple button (yet) for locking files so here’s a little Google Script that can help you make any file in your Google Drive read-only.
1. Open Google Drive and right-click any file that you wish to make a read-only file. Click the Share Link menu and copy the file link to the clipboard.
//docs.google.com/spreadsheets/d/12345_abcdef-123/edit?usp=sharing
2. Type script.new in the browser to open a new Google Apps Script project and copy-paste this snippet in the code editor.
/** * Make Google Drive files Read only * Author: * Web: //digitalinspiration.com/ * MIT License **/ const makeFileReadyOnly = () => { const fileUrl = '<<FILE URL>>'; const [fileId] = fileUrl.split('/').filter((e) => /[_-\w]{25,}/.test(e)); UrlFetchApp.fetch(`//www.googleapis.com/drive/v3/files/${fileId}`, { method: 'PATCH', contentType: 'application/json', headers: { Authorization: `Bearer ${ScriptApp.getOAuthToken()}`, }, payload: JSON.stringify({ contentRestrictions: [ { readOnly: true, reason: 'Prevent accidental editing', }, ], }), }); // For requesting correct scope, do not delete // var file = DriveApp.getFileById().setName() };
3. Replace the FILE URL in line #2 with the URL of the Drive file that you copied in the previous step.
4. Go to the Run menu, choose Run function > makeFileReadyOnly. Accept the permissions and your file will restricted from editing by anyone including yourself.
If you would like to remove the file lock and allow editing, open Google Drive, right click the same file and choose “Unlock file” from the menu to restore the editing behavior.
Also see: URL Tricks for Google Drive
Please do note that when you freeze a document with the Google Drive Lock API, even Google Scripts and Google Workspace add-ons are blocked from editing the file.