GitHub to Colab

Replace github.com with githubtocolab.com in a GitHub notebook URL to open it in Google Colab. For GitHub Gists, use githubtocolab.com/owner/gistid to auto-detect a single notebook.

Read the blog post for the story and usage details.

Examples

Each example shows the original URL, the shorter githubtocolab.com URL, and the Colab URL it redirects to.

GitHub repository notebook

  1. Start with a GitHub notebook URL:https://github.com/owner/repo/blob/main/notebook.ipynb
  2. Replace github.com with githubtocolab.com:https://githubtocolab.com/owner/repo/blob/main/notebook.ipynb
  3. It redirects to Colab:https://colab.research.google.com/github/owner/repo/blob/main/notebook.ipynb

GitHub Gist notebook

  1. Start with a public Gist that contains one notebook:https://gist.github.com/owner/gistid
  2. Use the matching githubtocolab.com shortcut:https://githubtocolab.com/owner/gistid
  3. It detects the notebook and redirects to Colab:https://colab.research.google.com/gist/owner/gistid/notebook.ipynb

Converter

Results will appear here.

Bookmarklet

Drag this link to your bookmarks bar, then click it from a GitHub notebook page:

Open in Colab