1. Home
  2. Web

How To Export Download Links From Chrome

Bookmarks and passwords saved in Chrome can be imported into other browsers. With Bookmarks, you don’t even need another browser. You can simply export them as an HTML file. Chrome, like all major browsers, is very flexible with what you can do with your bookmarks. It’s less flexible about your downloads. When you sync your data between two Chrome installations, your downloads history doesn’t go with you. If you do need those links though, you can export download links from Chrome to an HTML file with a bit of code.¬†This bit of code comes from Superuser¬†Eduard Florinescu.

Export Download Links From Chrome

Visit the Downloads page and tap the Ctrl+Shift+J keyboard shortcut. This will open the web console.

Paste the following in the console and tap the Enter key.

ditems = document.querySelector("downloads-manager").shadowRoot.querySelector("iron-list").querySelectorAll("downloads-item");

var div = document.createElement('div');

[].forEach.call(ditems, function (el) {
 var br = document.createElement('br');
 var hr = document.createElement('hr');
 div.appendChild(el.shadowRoot.querySelector("#url"));
 div.appendChild(br);
 div.appendChild(hr);

});
 document.body.innerHTML=""
 document.body.appendChild(div);
 document.head.style.innerHTML="";

The Downloads page will be reformatted. The style applied by Chrome is all stripped away leaving behind nothing but the links you downloaded files from. Once the formatting is gone, use the Ctrl+S keyboard shortcut to save the page as an HTML file.

You can open the HTML file in any browser and visit the download links again. Keep in mind that these aren’t links to a website. When you click on one of these links, it will take you either directly to a file, or it will start downloading the file right away. If you want to save a website, bookmarks is still the way to go.

If you delete a download from the Downloads page, it will not be exported. A file that you’ve moved from its original save location doesn’t count as deleting. An entry from the downloads page is deleted only when you click the close button next to it.

This doesn’t work in Firefox. Perhaps there’s an add-on that will let you export download links but that’s your only chance at exporting download links in Firefox. The downloads page in Firefox doesn’t come with a web console like Chrome’s download page does so there’s nothing to add code to.

It’s odd how both the top web browsers in the market, Chrome and Firefox, have a sync feature that can sync data between desktops and mobiles but that data doesn’t include download links. Download links are often important. In the event you can’t find a website you downloaded a particular file for, the download link might still work. In fact, your download links are bound to be less crowded than your browsing history anyway which means finding a lost link to a file is easier via the downloads.

Leave a comment