Getting Google Drive Direct Link

Muhammad Zeeshan
3 min readSep 5, 2021

What is direct link?

Direct link is a link that actually refers to some digital asset like an image, document or video etc. When direct link is followed, it download the referred file instead of opening a web page.

Use case

For example, you have a website and you want to serve some files to your end users but you don’t want to buy storage services like amazon s3 or google cloud storage etc. In this case you can use Google Drive as a cost effective alternative to host files for your end users. You might know that, by default when you share files using google drive shareable links it open a preview page. You can avoid the preview page for your user by using direct links.

How to get google drive shareable link?

In order to get a direct link of a file, first of all you need to make a shareable link and make sure your file’s visibility is set to Anyone with the link. Getting shareable link is a 3 step process:

  • Step 1: Goto Google Drive and right click the file that you want to share, then click on ‘Get link’.
  • Step 2: From the presented pop up change the visibility to ‘Anyone with the link’.
  • Step 3: Click on ‘Copy link’.

See the images below for reference of each step.

Step 1
Step 2
Step 3

How to get google drive direct link?

Getting direct link is a 3 step process:

  • Step 1: Goto g2d.dev
  • Step 2: Paste the copied shareable url in the given field and click on Create Direct Link button.
  • Step 3: Direct link will be generated and shown below the field. Click to copy the generated direct link. That’s it!
Step 1
Step 2 and Step 3

g2d.dev also supports generation of multiple links with 1 single click. All you need to do is to consolidate your all shareable links, separated with new line. Paste it in the `Multiple` tab and copy the generated links. That’s it! 😎

--

--