Embedding from Google Drive

A lot of the work we do for clients tends to be online and I find myself using Google Drive more and more. Not only to share files and documents client information but also as a fileshare. Google recently dropped their online storage costs significantly so it’s a great service to consider if you need online storage space.

Today’s trick is a simple bit of code that can be used to embed files located in your Google drive. The first step you will need to accomplish is to locate the actual fileID of your Google Doc. Open whatever file you’re wishing to embed and notice the fileID located in the URL in your address bar.


Make sure you copy that address as we’ll use in with our next bit of code. Copy the following code and replace [put your file id here] with the actual fileID you located in our previous step.

Embed Code

Just click the above image to zoom in on the code, or copy and paste from the code listed below.

<iframe src=”https://docs.google.com/viewer?srcid=[put your file id here]&pid=explorer&efh=false&a=v&chrome=false&embedded=true” width=”640px” height=”480px”></iframe>

You can easily adjust the size of the embed window via the above code, just adjust either the width or height values. Additionally, the code removes the standard left-navigation bar making a clean embed very simple. As always please contact us with any questions or comments and thanks for visiting!