# Simple URL Tricks For Google Drive You Should Know

**URL:** <https://onehack.st/t/simple-url-tricks-for-google-drive-you-should-know/214070>\
**Category:** Tutorials & Methods\
**Tags:** tips-tricks\
**Created:** [February 9, 2022, 12:35pm UTC](https://onehack.st/t/simple-url-tricks-for-google-drive-you-should-know/214070 "2022-02-09T12:35:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheStrength](https://onehack.st/user_avatar/onehack.st/thestrength/32/46753_2.png) [@TheStrength](https://onehack.st/u/TheStrength)\
**Post date:** [February 9, 2022, 12:35pm UTC](https://onehack.st/t/simple-url-tricks-for-google-drive-you-should-know/214070/1 "2022-02-09T12:35:00Z")

</div>

> Learn about secret URL tricks for Google Drive to quickly create direct download links, copy or preview shared files in Drive.

With Google Drive, you can store files in the cloud and share them easily with anyone. Open any file in Google Drive, click the Share button and you’ll get a URL (link) that others can use to access your file. This is common knowledge but Google Drive has plenty of URL tricks up its sleeve that will make these simple Drive links even more powerful.

## Google Drive URL Tricks

 ![image](https://onehack.st/uploads/default/original/3X/1/8/181198fda93e8e992a8f4b0f64937281b57cfee7.jpeg)

### Google Drive Web Viewer

Google Drive includes a built-in web viewer so people can view your shared files - from Microsoft Office documents to videos to AutoCAD drawings - directly in their browser. You can use this web viewer to view online files without having to download the files to your computer.

`https://docs.google.com/viewer?url=FILE_URL`

Replace `FILE_URL` with the full http link of the online document and anyone can view your file in the browser itself. Here’s an [example](https://docs.google.com/viewer?url=https://www.labnol.org/files/cool-websites.pdf).

### Reader Mode for Google Drive Files

You can view native Google documents in reader mode (sans the Google UI) by simply replace `/edit` in the Google Drive file URL with `/preview`.

So if the original share link of a file in Google Drive is:

`https://docs.google.com/spreadsheets/d/SHEET_ID/edit`

You can view the same document in a clean, reader mode using the link:

`https://docs.google.com/spreadsheets/d/SHEET_ID/preview`

Here’s a [Google Sheet](https://docs.google.com/spreadsheets/d/1swdjquWqq5tjMm9tpxMa-9C8rjCyWVWHs-ODdAXfWDw/preview), [Google Document](https://docs.google.com/document/d/1RixYPy2MVSQbdPfig-7LIVQjQ9zwfRq_d7gFxfZLwG0/preview) and [Google Slides](https://docs.google.com/presentation/d/1Q5LRdtUM6sVmCampVs8XL3uEMhpMWu9ntKyufod4iCE/preview) presentation in preview mode that is less-cluttered without any menus and toolbars and thus loads faster.

### Embed Google Documents in Web Pages

The `/preview` is useful when you need to embed a document, spreadsheet or presentation from Drive in your web page using the IFRAME tag as in this [live example](https://codepen.io/labnol/pen/jObVrbo).

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

```

### Download and Export Google Drive Files

The native file viewer is useful but sometimes you may want to bypass the built-in Google Docs viewer and force the browser to download the file instead of opening it. Thus if a user has Photoshop on their computer, the PSD file that you have shared through Google Drive will open in Photoshop and not in their web browser.

#### Create Direct Download Links and Skip the Web Viewer

When you upload any file in Google Drive and share it, the shared link looks like this:

`https://drive.google.com/open?id=DRIVE_FILE_ID`

The `FILE_ID` is unique for every file in Google Drive. If you copy this FILE\_ID and use it in the URL below, you’ll get a direct link to download the file from Google Drive ([example](https://drive.google.com/uc?export=download&id=1KHy848u_buBdM0IvNl65Xd5hGDOIlm7L)).

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

If you wish to open the file in the Google Drive web viewer, the viewer URL would be ([example](https://drive.google.com/file/d/1KHy848u_buBdM0IvNl65Xd5hGDOIlm7L/view)):

`https://drive.google.com/file/d/DRIVE_FILE_ID/view`

### Direct Download Links for Native Google Documents

The directly download URL trick works for native Google documents as well. This comes really handy if you want to give users an option to download your Google Document as a read-only PDF file or your Google Spreadsheet as an Excel XLS file.

#### Google Docs - Direct Downloads

Any document in your Google Drive has a URL like:

`https://docs.google.com/document/d/DOC_FILE_ID/edit`

Replace `/edit` with `/export?format=`, add the file format that the document should be saved as and your download link is ready ([example](https://docs.google.com/document/d/1RixYPy2MVSQbdPfig-7LIVQjQ9zwfRq_d7gFxfZLwG0/export?format=pdf)).

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

```

The above links will now download the same Google document in Word (.docx) and PDF formats. You can also specify txt, html, odt (OpenDocument) or epub for downloading the Google Document as an e-book.

#### Google Slides - Download Links

Like Google Documents, the URLs of presentations in Google Drive have this format:

`https://docs.google.com/presentation/d/PRESENTATION_ID/edit`

The direct download links for Google Slides is slightly different then Google Documents. Here replace `/edit` with `/export/format` where format can be pptx for downloading Google Slides as Microsoft Powerpoint files or PDF for exporting the presentation as a PDF slideshow.

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

```

The direct links for downloading the same presentation deck in PowerPoint (.pptx) and PDF formats are below: For instance, here’s a [presentation](https://docs.google.com/presentation/d/1Q5LRdtUM6sVmCampVs8XL3uEMhpMWu9ntKyufod4iCE/edit) on Google Slides that you directly download as a [PDF](https://docs.google.com/presentation/d/1Q5LRdtUM6sVmCampVs8XL3uEMhpMWu9ntKyufod4iCE/export/pdf) or a [PPT file](https://docs.google.com/presentation/d/1Q5LRdtUM6sVmCampVs8XL3uEMhpMWu9ntKyufod4iCE/export/pptx).

#### Download Google Slides as PNG Files

With Google Slides, you can either export the entire presentation as a PDF or you can create links to individual slides that will download the slide as a high-res PNG file.

All you need to do is add `?pageid=pPAGE_NUMBER` to the export url. So if I were to download the 10th slide as a PNG file, the URL would be:

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

#### Google Sheets - Export Links

Open your Google Spreadsheet in Google Drive, make the sheet Public (or share with `Anyone with a link`) and make a note of the shared URL. It should be something like this:

`https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit`

The direct download links for Google Sheets are similar to Google Docs and the sheets can be exported as PDF, Excel XLSX and CSV files.

```auto
https://docs.google.com/spreadsheets/d/FILE_ID/export?format=xlsx
https://docs.google.com/spreadsheets/d/FILE_ID/export?format=pdf
https://docs.google.com/spreadsheets/d/FILE_ID/export?format=csv

```

For instance, here’s the COVID-19 [spreadsheet](https://docs.google.com/spreadsheets/d/1swdjquWqq5tjMm9tpxMa-9C8rjCyWVWHs-ODdAXfWDw/edit#gid=936573058) and you can directly download the file as [PDF](https://docs.google.com/spreadsheets/d/1swdjquWqq5tjMm9tpxMa-9C8rjCyWVWHs-ODdAXfWDw/export?format=pdf) or [XLS](https://docs.google.com/spreadsheets/d/1swdjquWqq5tjMm9tpxMa-9C8rjCyWVWHs-ODdAXfWDw/export?format=xlsx) file with simple manipulation of the original sheet URL.

### Copy and Make any shared Google Drive File your own

Replace `/edit` with `/copy` in the URL of any native Google Drive file and anyone can click that link to quickly make a copy of that file in their own Google Drive. [Try here](https://docs.google.com/document/d/1RixYPy2MVSQbdPfig-7LIVQjQ9zwfRq_d7gFxfZLwG0/copy).

```auto
Original Link:
https://docs.google.com/document/d/FILE_ID/edit

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

```

The `/copy` URL trick works for Google Docs, Sheets, Slides and Google Scripts. Add `?copyComments=true` if you would like the copied document to include the comments from the original document. Set `includeResolvedCommentsOnCopy=false` to skip copying resolved comments and `copyCollaborators=false` to not share the copied document with the original collaborators.

You can use it for Google Forms as well but the form will be copied to another user’s Google Account only if the form owner has granted access to the form.

#### Invite users when copying documents

If you add `userstoinvite=email@domain.com` to the copy URL, the Google user who is copying the document will be prompted to share the document with the specific Google account immediately after copying the document.

`https://docs.google.com/document/d/FILE_ID/copy?userstoinvite=emailaddres`

#### Google Drawings - Embed as Image

You can export your Google Drawings as SVG, PNG, JPEG or PDF files by replace `/edit` in the drawing URL with `/export/FORMAT`.

For instance, if the Google Drawing URL in Drive is:

`https://docs.google.com/drawings/d/FILE_ID/edit`

The direct link for downloading the drawing in vector format like SVG or as a PDF file would be:

```auto
https://docs.google.com/drawings/d/FILE_ID/export/svg
https://docs.google.com/drawings/d/FILE_ID/export/pdf
https://docs.google.com/drawings/d/FILE_ID/export/jpg

```

You can even use these links to embed Google Drawings as inline images in your HTML webpages using the `<img>` tag as shown here.

```auto
<p>
  <img src="https://docs.google.com/drawings/d/FILE_ID/export/png" alt="Google Drawing" />
</p>

```

(Source: labnol)
