RawHub – GitHub Raw Link Generator
Convert any GitHub file or code to a direct raw link — instantly!
About RawHub
GitHub file pages show code inside a web page. A raw link skips that page and gives you the file itself, so you can load it in a script tag, download it with curl, or open it in an app.
RawHub turns the normal file link into that raw link. Everything happens in your browser. Your links are never sent to a server.
GitHub link to raw link: examples
A normal GitHub file link has /blob/ in it. A raw link uses the host raw.githubusercontent.com and drops /blob. RawHub does this for you, and these are the patterns it understands.
raw.githubusercontent.com/user/repo/main/app.pygist.githubusercontent.com/user/1a2b3c/rawraw.githubusercontent.com/user/repo/9fceb02/app.pyUse a raw link in your code
curl -O https://raw.githubusercontent.com/user/repo/main/app.pywget https://raw.githubusercontent.com/user/repo/main/app.pyrequests.get("https://raw.githubusercontent.com/user/repo/main/app.py").textFrequently asked questions
What is a raw link?
It is a direct address to the plain file content, hosted on raw.githubusercontent.com. It has no GitHub page design around it.
Which links work?
File links containing /blob/, and Gist links. Links to folders (/tree/) or whole repositories have no single raw file, so RawHub shows an error for them.
Does it work with private repositories?
No. A raw link only opens for people who can already see the file. For private files, GitHub asks for a login or an access token.
Is my link stored anywhere?
No. The conversion runs in your browser and nothing is saved or uploaded.
Can I use a raw link as a script on my website?
Raw links are served as plain text, so browsers may refuse to run them as scripts. For websites, a CDN such as jsDelivr (cdn.jsdelivr.net/gh/user/repo@branch/file) is the better choice.
Does the link change if I update the file?
If the link names a branch like main, it always shows the newest version. If it names a commit, it keeps showing that exact version.