SharePoint Online: Link to Force Download a Document Instead of Open

Requirement: Force download a file instead of opening it in SharePoint Online.

SharePoint Online: URL to Document Download Instead of Open

Documents (Word/Excel/PowerPoint files/PDF file types) linked in SharePoint Online pages, navigation menu, lists, etc., open in the browser (or in client application!) directly either in Read-only mode or in Edit mode, based on user permissions. What if you want to force download a file instead of opening it in the browser with Microsoft Office Online applications? Here are some workarounds to generate a link that downloads the document directly (or a force download link).

Option 1: Frame the download link to force Download instead of Open

How do I create a direct download link to a file? Use the format to frame a force download link: https://<yourdomain>.sharepoint.com/sites/<yoursite>/_layouts/download.aspx?SourceUrl=<document-URL>

E.g., https://crescent.sharepoint.com/sites/legal/_layouts/download.aspx?SourceUrl=https://crescent.sharepoint.com/sites/Legal/Documents/Compliance-Manual.pdf

When a user clicks on the link, It downloads the file instead of open! Confirmed this trick works in SharePoint Online and SharePoint on-premises versions 2013/2016/2019.

Option 2: Use the “Copy link” Option and append “&download=1”

Just navigate to the SharePoint document library where your documents are located, select the file and click on the “Copy link” button in the ribbon >> Copy the URL and append “&download=1” to the end of the URL.

E.g., https://crescent.sharepoint.com/:w:/s/legal/ECm5WU0-3ohOo2n8-q5GQG4Bar33Prunsg4g9QvAPu3cRQ?e=UPMiz5&download=1

sharepoint online document download instead of open

This URL directly links to the download document in SharePoint Online, and you’ll see the SharePoint file is downloaded directly instead of opening in the Office application or in web browsers like Google Chrome browser.

Want to do the reverse? Instead of downloading, do You want to open documents in the browser? Sure, Just append “?web=1” to the Hyperlinks! E.g. “https://crescent.sharepoint.com/documents/branding-template.docx?web=1“.

The “Open Documents in Client Applications by Default” feature in Site Settings >> Site collection features, and the library settings “Opening Documents in the Browser” in advanced settings also play a role here. More here: Open a Document in Browser instead of Client Application in SharePoint Online

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

22 thoughts on “SharePoint Online: Link to Force Download a Document Instead of Open

  • It didn’t worked for me, but I found another way on Edge browser: just select file in sherpoint document library, press download in the meniu, then download pop up appears on the up left corner of the browser, then right button, and “Copy download link”.

    Reply
    • MZ, you just saved me so much headache. This is exactly what I was looking for. Thank you!

      Reply
  • Great.
    Thanks a lot, you’ve made me happy !

    Reply
  • I need to do the oposit : when the user open the link i shared, i want the image to be displayed in the sharepoint not downloaded. It works with pdf but i have images (.tiff files) and the link always download the file even if there is &web=1 in the link.
    Does someone has a solution ?

    Reply
  • Hi I tried the ways that you mentioned above but it tells me that it requires access so is there a way to download it without access/ permission?

    Reply
  • Hey,
    How to download directly if the link is a SafeLink

    Reply
  • Hi, in my case the following worked.
    1. Copy your Sharepoint document link.
    2. Then replace the “&web=1” part in the URL by “&download=1”. So to be clear. Don’t add “&download=1” at the end of the URL but somewhere in the middle where you find the “&web=1” string.

    Hope I could help.

    Reply
    • I have to add the following: Even if you force Sharepoint to downlaod the file it still depends on the preferences in your browser whether or not the file is open in your browser/preferred app or just downloaded. That might also solve Stevos problem.

      Reply
    • That works, Thanks.

      Reply
  • I find that this “&download=1” doesn’t actually DOWNLOAD the file but opens it in my desktop app (MS word) from the website and if then saved it saves back the the SharePoint site.

    Reply
  • Hi, do you have a way to force download a view only pdf file from onedrive?

    Reply
  • On modern pages it is much much easier than all that. When you Copy Link on modern pages it give you a long string of stuff. Something like this:

    https://SITE.sharepoint.com/:x:/r/sites/SITENAME/FOLDERNAME/FILENAME.EXT? d=w7cdaa68ce7764cae8asdfffee162e4184&csf=1&e=w9SNfff

    This link will open the file, either in a Web App or a Desktop Application, depending on your settings. To make the link download you need to remove some things from the copied link

    Once you paste the copied link into a hyperlink or button or whatever, just remove all text after the ? after the file extension and you get a link that directly downloads the file instead of opening it. Something like the below:

    https://SITE.sharepoint.com/:x:/r/sites/SITENAME/FOLDERNAME/FILENAME.EXT?

    I found this solution here, which I copy pasted from:
    https://social.msdn.microsoft.com/Forums/office/en-US/f4f52b57-4e09-4ab3-b89f-0731e5ea684c/sharepoint-online-enable-direct-download-instead-of-opening-document-when-clicking-on-the-link?forum=appsforsharepoint

    Happy Trails!

    Reply
    • Is there a way to automate the creation of these links? I have document libraries with 50-100+ files that are legal fillable forms in Word – Manually creating those is way too time consuming.

      Reply
    • It does not seem to work with image files

      Reply
    • Thanks, this is the best and easiest way to do it.

      Reply
    • Thank you! that worked perfectly for me.

      Reply
  • Try the following o SharePoint Online modern site:
    https://.sharepoint.com/sites//_layouts/download.aspx?SourceUrl=

    Reply
  • Copy the URL and append “?&download=1” to copied URL then it going to work.

    Reply
  • I can’t get it to work either, maybe they updated something and this method no longer works. Article is a year old as of this comment.

    Reply
  • Hi, i can’t get this to work every time, only occasionally, any suggestions as to what i might be doing wrong?

    Reply
    • Try this
      https://.sharepoint.com/sites//_layouts/download.aspx?SourceUrl=

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *