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

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

SharePoint Online: URL to Document Download Instead of Open

Documents 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 downloading a file, instead of opening it in the browser? Well, here are some ways to generate a link that downloads the document directly (or force download link).

Option 1:

Use the format to frame a force download link: https://<yourdomain><yoursite>/_layouts/download.aspx?SourceUrl=<document-URL>


When a user clicks on the link, It downloads the file instead of open!

Option 2:

Use to “Copy link” Option to get the link to a document and append “&download=1”
Just navigate to the 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 it.


sharepoint online document download instead of open

This URL directly links to document the download in SharePoint Online.

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. ““. More here: Open a Document in Browser instead of Client Application in SharePoint Online

Salaudeen Rajack

Salaudeen Rajack is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

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

  • 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: 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:

    I found this solution here, which I copy pasted from:

    Happy Trails!

    • 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.

    • It does not seem to work with image files

  • Try the following o SharePoint Online modern site:

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

  • 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.

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

    • Try this


Leave a Reply