Skip to main content

Google Drive Direct Links

  1. Share the file you want to pull from Google Drive
  2. Copy the share link, set the permissions to "Anyone with the link"
  3. Paste the share link somewhere (to get the ID)
  4. Use one of the URLs below and add the ID of the item
  5. Use the new URL to get direct access to the file!

https://drive.google.com/uc?export=download&id=FILEID

Example Usage

Your file in Google Drive: https://drive.google.com/file/d/1aVlxT16wL5bbPamincSEPp0RB1c4nrwk/view?usp=sharing

The File ID from the above link: 1aVlxT16wL5bbPamincSEPp0RB1c4nrwk

Final Direct Access Link: https://drive.google.com/uc?export=download&id=1aVlxT16wL5bbPamincSEPp0RB1c4nrwk

Images

For images, especially when using in web related tings like HTML, I found this URL to work best:

Direct Access Link: https://drive.google.com/uc?id=DRIVE_FILE_ID

For example: <img src="https://drive.google.com/uc?id=DRIVE_FILE_ID" alt="Google Drive Image" />

Other Google Drive Links

Google Docs Reader Mode

Add a /preview  to the end of the URL to view it in reader mode's UI (replace the /edit part).

Before: https://docs.google.com/document/d/1nJcfN_T2EyLEuWYSrwGGXGaOa2PCX9tAVQ3y-oURE3s/edit

After: https://docs.google.com/document/d/1nJcfN_T2EyLEuWYSrwGGXGaOa2PCX9tAVQ3y-oURE3s/preview

Google Drive Web Viewer

Simply use https://docs.google.com/viewer?url=FILE_URL. This is will conjure up the file viewer you see when opening things like PDFs, images, etc. that are not native Google Docs files that have their own editor.

Before: https://docs.google.com/document/d/1nJcfN_T2EyLEuWYSrwGGXGaOa2PCX9tAVQ3y-oURE3s/edit?usp=sharing

After: https://docs.google.com/viewer?url=https://docs.google.com/document/d/1nJcfN_T2EyLEuWYSrwGGXGaOa2PCX9tAVQ3y-oURE3s/edit?usp=sharing

Embed Code

The following will allow you to embed an item from Google Drive using an IFrame.

 <iframe src="https://docs.google.com/document/d/FILE_ID/preview" height="600px" width=“800px" allowfullscreen></iframe>
Direct Download as PDF

https://docs.google.com/document/d/DOC_FILE_ID/export?format=pdf

Direct Download as Word Doc

https://docs.google.com/document/d/DOC_FILE_ID/export?format=doc

Direct Download as PDF

https://docs.google.com/presentation/d/PRESENTATION_ID/export/pdf

Direct Download as PowerPoint

https://docs.google.com/presentation/d/PRESENTATION_ID/export/pptx

Direct Download as PNG

This is a bit silly, but you can only download the whole ass presentation as a PDF (see above) or you can do each slide as a PNG. Do note from the web editor, you can download your slides as JPG too.

https://docs.google.com/presentation/d/FILE_ID/export/png?pageid=p10

Direct Download as PDF

https://docs.google.com/spreadsheets/d/FILE_ID/export?format=pdf

Direct Download as XLSX

https://docs.google.com/spreadsheets/d/FILE_ID/export?format=xlsx

Direct Download as CSV

https://docs.google.com/spreadsheets/d/FILE_ID/export?format=csv

Direct Download as SVG

https://docs.google.com/drawings/d/FILE_ID/export/svg

Direct Download as PDF

https://docs.google.com/drawings/d/FILE_ID/export/pdf

Direct Download as JPG

https://docs.google.com/drawings/d/FILE_ID/export/jpg

Use Google Drawings Inline with HTML
<p>
  <img src="https://docs.google.com/drawings/d/FILE_ID/export/png" alt="Google Drawing" />
</p>

Copy a Drive File as Your Own

Someone share a file with you, but you want your own copy? Use the following to create a copy with you as the owner.

https://docs.google.com/document/d/FILE_ID/copy