Skip to content

Instantly share code, notes, and snippets.

@wanglf
Last active April 12, 2025 14:14
Download VS Code extensions as VSIX

How to use?

  • Copy content of vsix-bookmarklet, create a bookmark in your browser.
  • Navigate to the web page of the VS Code extension you want to install.
  • Click the bookmark you just created, then click the download button.
    download
  • After download finished, rename the file extension to *.vsix.
  • In VS Code, select Install from VSIX... in the extension context menu.
    vsc

How does it work?

http://stackoverflow.com/a/38866913/1032492

A VS Code extension's offline install package (VSIX) is available at:

https://${publisher}.gallery.vsassets.io/_apis/public/gallery/publisher/${publisher}/extension/${extension name}/${version}/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage

Take the syntax highlight extension for Vue.js as an example:

https://marketplace.visualstudio.com/items?itemName=liuji-jim.vue

  • The itemName query is a composition of publisher and extension name, separated with a dot.
  • The publisher is liuji-jim.
  • The extension name is vue.
  • The latest version number is in More Info section on the right side.
    more

So the package can be downloaded via this URL:

https://liuji-jim.gallery.vsassets.io/_apis/public/gallery/publisher/liuji-jim/extension/vue/0.1.3/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage

javascript:!function(){(function(){for(var%20e={version:%22%22,publisher:%22%22,identifier:%22%22,getDownloadUrl:function(){return[%22https://%22,this.identifier.split(%22.%22)[0],%22.gallery.vsassets.io/_apis/public/gallery/publisher/%22,this.identifier.split(%22.%22)[0],%22/extension/%22,this.identifier.split(%22.%22)[1],%22/%22,this.version,%22/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage%22].join(%22%22)},getFileName:function(){return[this.identifier,%22_%22,this.version,%22.vsix%22].join(%22%22)},getDownloadButton:function(){var%20e=document.createElement(%22a%22);return%20e.innerHTML=%22Download%20VSIX%22,e.href=%22javascript:void(0);%22,e.style.fontFamily=%22wf_segoe-ui,Helvetica%20Neue,Helvetica,Arial,Verdana%22,e.style.display=%22inline-block%22,e.style.padding=%222px%205px%22,e.style.background=%22darkgreen%22,e.style.color=%22white%22,e.style.fontWeight=%22bold%22,e.style.margin=%222px%205px%22,e.setAttribute(%22data-url%22,this.getDownloadUrl()),e.setAttribute(%22data-filename%22,this.getFileName()),e.onclick=function(e){e.target.onclick=null,e.target.innerHTML=%22Downloading%20VSIX...%22;var%20t=new%20XMLHttpRequest;console.log(e.target.getAttribute(%22data-url%22)),t.open(%22GET%22,e.target.getAttribute(%22data-url%22),!0),t.responseType=%22blob%22,t.onprogress=function(t){if(t.lengthComputable){var%20r=t.loaded/t.total*100;e.target.innerHTML=%22Downloading%20VSIX...%22+r.toString()+%22%25%22}},t.onload=function(t){if(200==this.status){var%20r=this.response,n=document.createElement(%22a%22);n.href=window.URL.createObjectURL(r),n.download=e.target.getAttribute(%22data-filename%22),n.click(),e.target.href=n.href,e.target.download=n.download,e.target.innerHTML=%22Download%20VSIX%22}else%20e.target.innerHTML=%22Error.%20Please%20reload%20the%20page%20amd%20try%20again.%22,alert(%22Error%20%22+this.status+%22%20error%20receiving%20the%20document.%22)},t.onerror=function(t){e.target.innerHTML=%22Error.%20Please%20reload%20the%20page%20amd%20try%20again.%22,alert(%22Error%20%22+t.target.status+%22%20occurred%20while%20receiving%20the%20document.%20%22)},t.send()},e}},t={Version:%22version%22,Publisher:%22publisher%22,%22Unique%20Identifier%22:%22identifier%22},r=document.querySelectorAll(%22.ux-table-metadata%20tr%22),n=0;n%3Cr.length;n++){var%20i=r[n],a=i.querySelectorAll(%22td%22);if(2==a.length){var%20o=a[0].innerText.replace(/^\s+|\s+$/g,%22%22),l=a[1].innerText.replace(/^\s+|\s+$/g,%22%22);t.hasOwnProperty(o)%26%26(e[t[o]]=l)}}document.querySelector(%22.vscode-moreinformation%22).parentElement.appendChild(e.getDownloadButton()).scrollIntoView(),e})()}();
@TheSubMatrix
Copy link

Seems the URL has changed to: https://marketplace.visualstudio.com/_apis/public/gallery/publishers/${publisher}/vsextensions/${extension}/${version}/vspackage

Assuming this, here is a (very) rough bookmarklet: javascript:(function()%7Bconst%20URL_VSIX_PATTERN%20%3D%20'https%3A%2F%2Fmarketplace.visualstudio.com%2F_apis%2Fpublic%2Fgallery%2Fpublishers%2F%24%7Bpublisher%7D%2Fvsextensions%2F%24%7Bextension%7D%2F%24%7Bversion%7D%2Fvspackage'%3B%0A%0Alet%20itemName%20%3D%20new%20URL(window.location.href).searchParams.get('itemName')%3B%0Alet%20%5Bpublisher%2C%20extension%5D%20%3D%20itemName.split('.')%3B%0Alet%20version%20%3D%20document.querySelector('%23versionHistoryTab%20tbody%20tr%20.version-history-container-column').textContent%3B%0A%0Alet%20url%20%3D%20URL_VSIX_PATTERN.replace('%24%7Bpublisher%7D'%2C%20publisher)%0A%09%09%09%09%09%09%20%20.replace('%24%7Bextension%7D'%2C%20extension)%0A%09%09%09%09%09%09%20%20.replace('%24%7Bversion%7D'%2C%20version)%3B%0A%0Awindow.open(url%2C%20'_blank')%3B%7D)()%3B

This works but I had to modify mine slightly to get the win32-x64 version so mine ended up being
javascript:(function()%7Bconst%20URL_VSIX_PATTERN%20%3D%20'https%3A%2F%2Fmarketplace.visualstudio.com%2F_apis%2Fpublic%2Fgallery%2Fpublishers%2F%24%7Bpublisher%7D%2Fvsextensions%2F%24%7Bextension%7D%2F%24%7Bversion%7D%2Fvspackage%3FtargetPlatform%3Dwin32%2Dx64'%3B%0A%0Alet%20itemName%20%3D%20new%20URL(window.location.href).searchParams.get('itemName')%3B%0Alet%20%5Bpublisher%2C%20extension%5D%20%3D%20itemName.split('.')%3B%0Alet%20version%20%3D%20document.querySelector('%23versionHistoryTab%20tbody%20tr%20.version-history-container-column').textContent%3B%0A%0Alet%20url%20%3D%20URL_VSIX_PATTERN.replace('%24%7Bpublisher%7D'%2C%20publisher)%0A%09%09%09%09%09%09%20%20.replace('%24%7Bextension%7D'%2C%20extension)%0A%09%09%09%09%09%09%20%20.replace('%24%7Bversion%7D'%2C%20version)%3B%0A%0Awindow.open(url%2C%20'_blank')%3B%7D)()%3B

@CypherpunkSamurai
Copy link

Well I just Created this:
https://github.com/CypherpunkSamurai/vsix-downloader-webui

hope it helps

@bsdice
Copy link

bsdice commented Feb 24, 2025

@CypherpunkSamurai 404 on my end

@CypherpunkSamurai
Copy link

@CypherpunkSamurai 404 on my end

ah sorry, forgot to make it public. check now

@bsdice
Copy link

bsdice commented Feb 24, 2025

@CypherpunkSamurai Bugreport... if you look for a package that needs binaries (ARM64, x64 etc.) I get Apple binaries. Example: Try "shellcheck". Here I got Apple arm64. Probably because it was the first in the list alphabetically.

I used the Javascriptlet to download timonwong.shellcheck-0.37.7@linux-x64.vsix because I use vscodium on Linux x64. VSIX downloaded is also not of type "universal" with more than one arch.

Also, files are downloaded as Microsoft.VisualStudio.Services.zip would prefer to be named timonwong.shellcheck-0.37.7@linux-x64.vsix.

@CypherpunkSamurai
Copy link

@CypherpunkSamurai Bugreport... if you look for a package that needs binaries (ARM64, x64 etc.) I get Apple binaries. Example: Try "shellcheck". Here I got Apple arm64. Probably because it was the first in the list alphabetically.

I used the Javascriptlet to download timonwong.shellcheck-0.37.7@linux-x64.vsix because I use vscodium on Linux x64. VSIX downloaded is also not of type "universal" with more than one arch.

Also, files are downloaded as Microsoft.VisualStudio.Services.zip would prefer to be named timonwong.shellcheck-0.37.7@linux-x64.vsix.

Noted. Will address in a patch.

The file name however, I'm unsure if I can add it as it's fetched from the server.

@bsdice
Copy link

bsdice commented Feb 24, 2025

@CypherpunkSamurai Appreciate it. If you look on https://open-vsx.org/extension/timonwong/shellcheck and click Download it gives you a large list of architectures. Anyhow, very tidy and snappy web ui, too. Could be its own vscodium extension, maybe. Like Chromium Web Store for ungoogled-chromium. But people are well advised to just stick with versions that work and not update like mad, to lower malware risk. Update only for known and desireable new features. Like often the case recently with Ruff linter. Thank you!

@grester
Copy link

grester commented Feb 25, 2025

@Nathrai

javascript:(function()%7Bconst%20URL_VSIX_PATTERN%20%3D%20'https%3A%2F%2Fmarketplace.visualstudio.com%2F_apis%2Fpublic%2Fgallery%2Fpublishers%2F%24%7Bpublisher%7D%2Fvsextensions%2F%24%7Bextension%7D%2F%24%7Bversion%7D%2Fvspackage'%3B%0A%0Alet%20itemName%20%3D%20new%20URL(window.location.href).searchParams.get('itemName')%3B%0Alet%20%5Bpublisher%2C%20extension%5D%20%3D%20itemName.split('.')%3B%0Alet%20version%20%3D%20document.querySelector('tbody%20tr%20.version-history-container-column').textContent%3B%0A%0Alet%20url%20%3D%20URL_VSIX_PATTERN.replace('%24%7Bpublisher%7D'%2C%20publisher)%0A%09%09%09%09%09%09%20%20.replace('%24%7Bextension%7D'%2C%20extension)%0A%09%09%09%09%09%09%20%20.replace('%24%7Bversion%7D'%2C%20version)%3B%0A%0Awindow.open(url%2C%20'_blank')%3B%7D)()%3B

Kudos to you!
F Microsoft.

@CypherpunkSamurai
Copy link

@CypherpunkSamurai Appreciate it. If you look on https://open-vsx.org/extension/timonwong/shellcheck and click Download it gives you a large list of architectures. Anyhow, very tidy and snappy web ui, too. Could be its own vscodium extension, maybe. Like Chromium Web Store for ungoogled-chromium. But people are well advised to just stick with versions that work and not update like mad, to lower malware risk. Update only for known and desireable new features. Like often the case recently with Ruff linter. Thank you!

Fixed.

Checkout:
https://cypherpunksamurai.github.io/vsix-downloader-webui/

@rattlecattle
Copy link

@CypherpunkSamurai Works on Chrome but not on Firefox (CORS error).

@CypherpunkSamurai
Copy link

cant fix cors without a cors proxy tho :(

@muja
Copy link

muja commented Mar 4, 2025

@CypherpunkSamurai works for me on firefox / librewolf. Really awesome tool! Currently there is no easy way to copy the download URL (for sharing etc), would it be for example possible to use anchor tags instead of span for the download buttons so one can right click "copy download url"?

@CypherpunkSamurai
Copy link

CypherpunkSamurai commented Mar 4, 2025

@CypherpunkSamurai works for me on firefox / librewolf. Really awesome tool! Currently there is no easy way to copy the download URL (for sharing etc), would it be for example possible to use anchor tags instead of span for the download buttons so one can right click "copy download url"?

fixed

@CypherpunkSamurai
Copy link

Hey guys, please star if you like the project. Starring it would help others find it faster and seo rank it :)

@muja
Copy link

muja commented Mar 4, 2025

@CypherpunkSamurai works for me on firefox / librewolf. Really awesome tool! Currently there is no easy way to copy the download URL (for sharing etc), would it be for example possible to use anchor tags instead of span for the download buttons so one can right click "copy download url"?

fixed

that was fast! absolute legend :) starred

@CypherpunkSamurai
Copy link

thank you, i hope people find it helpful :)

@yhling
Copy link

yhling commented Mar 10, 2025

Seems the URL has changed to: https://marketplace.visualstudio.com/_apis/public/gallery/publishers/${publisher}/vsextensions/${extension}/${version}/vspackage
Assuming this, here is a (very) rough bookmarklet: javascript:(function()%7Bconst%20URL_VSIX_PATTERN%20%3D%20'https%3A%2F%2Fmarketplace.visualstudio.com%2F_apis%2Fpublic%2Fgallery%2Fpublishers%2F%24%7Bpublisher%7D%2Fvsextensions%2F%24%7Bextension%7D%2F%24%7Bversion%7D%2Fvspackage'%3B%0A%0Alet%20itemName%20%3D%20new%20URL(window.location.href).searchParams.get('itemName')%3B%0Alet%20%5Bpublisher%2C%20extension%5D%20%3D%20itemName.split('.')%3B%0Alet%20version%20%3D%20document.querySelector('%23versionHistoryTab%20tbody%20tr%20.version-history-container-column').textContent%3B%0A%0Alet%20url%20%3D%20URL_VSIX_PATTERN.replace('%24%7Bpublisher%7D'%2C%20publisher)%0A%09%09%09%09%09%09%20%20.replace('%24%7Bextension%7D'%2C%20extension)%0A%09%09%09%09%09%09%20%20.replace('%24%7Bversion%7D'%2C%20version)%3B%0A%0Awindow.open(url%2C%20'_blank')%3B%7D)()%3B

This works!

this is the only solution that managed to download the actual .vsix in this entire thread.

@dkds
Copy link

dkds commented Mar 10, 2025

Seems the URL has changed to: https://marketplace.visualstudio.com/_apis/public/gallery/publishers/${publisher}/vsextensions/${extension}/${version}/vspackage

Assuming this, here is a (very) rough bookmarklet: javascript:(function()%7Bconst%20URL_VSIX_PATTERN%20%3D%20'https%3A%2F%2Fmarketplace.visualstudio.com%2F_apis%2Fpublic%2Fgallery%2Fpublishers%2F%24%7Bpublisher%7D%2Fvsextensions%2F%24%7Bextension%7D%2F%24%7Bversion%7D%2Fvspackage'%3B%0A%0Alet%20itemName%20%3D%20new%20URL(window.location.href).searchParams.get('itemName')%3B%0Alet%20%5Bpublisher%2C%20extension%5D%20%3D%20itemName.split('.')%3B%0Alet%20version%20%3D%20document.querySelector('%23versionHistoryTab%20tbody%20tr%20.version-history-container-column').textContent%3B%0A%0Alet%20url%20%3D%20URL_VSIX_PATTERN.replace('%24%7Bpublisher%7D'%2C%20publisher)%0A%09%09%09%09%09%09%20%20.replace('%24%7Bextension%7D'%2C%20extension)%0A%09%09%09%09%09%09%20%20.replace('%24%7Bversion%7D'%2C%20version)%3B%0A%0Awindow.open(url%2C%20'_blank')%3B%7D)()%3B

Can confirm, this works as of now, Thank you @wanglf and @guillaumegarcia13, and everyone!

@realyukii
Copy link

in my case, the bookmark just replace the whole document with the word "true", I use firefox as a browser

image

@adityagandhi-86
Copy link

Well I just Created this: https://github.com/CypherpunkSamurai/vsix-downloader-webui

hope it helps

It can't search or give any results..

@CypherpunkSamurai
Copy link

Well I just Created this: https://github.com/CypherpunkSamurai/vsix-downloader-webui
hope it helps

It can't search or give any results..

install cors unblock if you're on firefox or firefox based browser

@EachenL
Copy link

EachenL commented Mar 18, 2025

Seems the URL has changed to: https://marketplace.visualstudio.com/_apis/public/gallery/publishers/${publisher}/vsextensions/${extension}/${version}/vspackage
Assuming this, here is a (very) rough bookmarklet: javascript:(function()%7Bconst%20URL_VSIX_PATTERN%20%3D%20'https%3A%2F%2Fmarketplace.visualstudio.com%2F_apis%2Fpublic%2Fgallery%2Fpublishers%2F%24%7Bpublisher%7D%2Fvsextensions%2F%24%7Bextension%7D%2F%24%7Bversion%7D%2Fvspackage'%3B%0A%0Alet%20itemName%20%3D%20new%20URL(window.location.href).searchParams.get('itemName')%3B%0Alet%20%5Bpublisher%2C%20extension%5D%20%3D%20itemName.split('.')%3B%0Alet%20version%20%3D%20document.querySelector('%23versionHistoryTab%20tbody%20tr%20.version-history-container-column').textContent%3B%0A%0Alet%20url%20%3D%20URL_VSIX_PATTERN.replace('%24%7Bpublisher%7D'%2C%20publisher)%0A%09%09%09%09%09%09%20%20.replace('%24%7Bextension%7D'%2C%20extension)%0A%09%09%09%09%09%09%20%20.replace('%24%7Bversion%7D'%2C%20version)%3B%0A%0Awindow.open(url%2C%20'_blank')%3B%7D)()%3B

Worked! Thanks

thanks!!!

@sami4600
Copy link

best way and easy,
download vsix file from: https://www.vsixhub.com/

@CypherpunkSamurai
Copy link

CypherpunkSamurai commented Mar 18, 2025 via email

@Kaylebor
Copy link

If someone is interested, I've created a Greasyfork script that more or less does the same, but automatically on page load.
https://greasyfork.org/en/scripts/530348-vs-code-extension-downloader

@Yonodactyl
Copy link

I just made this one - instead of doing something weird, it grabs the data as easily as possible for you to copy and paste:

javascript:(function(){
  var url = window.location.href;
  var match = url.match(/itemName=([^&]+)/);
  if(!match){alert('Could not find extension name'); return;}
  var itemName = match[1];
  var parts = itemName.split('.');
  var publisher = parts[0];
  var extension = parts[1];
  var versionElem = document.querySelector('td[aria-labelledby="Version"]');
  if(!versionElem){alert('Could not find version'); return;}
  var version = versionElem.textContent.trim();
  var downloadUrl = 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/'+publisher+'/vsextensions/'+extension+'/'+version+'/vspackage';
  alert('Download URL:\n'+downloadUrl);
})();

@BobNich
Copy link

BobNich commented Apr 11, 2025

I just made this one - instead of doing something weird, it grabs the data as easily as possible for you to copy and paste:

javascript:(function(){
  var url = window.location.href;
  var match = url.match(/itemName=([^&]+)/);
  if(!match){alert('Could not find extension name'); return;}
  var itemName = match[1];
  var parts = itemName.split('.');
  var publisher = parts[0];
  var extension = parts[1];
  var versionElem = document.querySelector('td[aria-labelledby="Version"]');
  if(!versionElem){alert('Could not find version'); return;}
  var version = versionElem.textContent.trim();
  var downloadUrl = 'https://marketplace.visualstudio.com/_apis/public/gallery/publishers/'+publisher+'/vsextensions/'+extension+'/'+version+'/vspackage';
  alert('Download URL:\n'+downloadUrl);
})();

Thanks. I tested it, but it didn’t work. Changing td[aria-labelledby="Version"] to td[aria-labelledby="version"] fixed the issue.

@mpql
Copy link

mpql commented Apr 11, 2025

If someone is interested, I've created a Greasyfork script that more or less does the same, but automatically on page load. https://greasyfork.org/en/scripts/530348-vs-code-extension-downloader

Excellent work, thank you for sharing! 🍻

@aiziyuer
Copy link

If someone is interested, I've created a Greasyfork script that more or less does the same, but automatically on page load. https://greasyfork.org/en/scripts/530348-vs-code-extension-downloader
thank u for that, it works!

@tlanyan
Copy link

tlanyan commented Apr 12, 2025

best way and easy, download vsix file from: https://www.vsixhub.com/

Actually, some extension cannot be downloaded from the vsixhub, e.g. Modern Fortran. I have created an online downloader https://vsix.2i.gs and a chrome extension VSIX Downloader to help users download VSIX files easily. I wish you can like it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment