View .ipynb files from GitHub
nbview opens a Jupyter notebook from a GitHub repo, a gist or a direct link and draws it in your browser, with the outputs that were saved into the file. Nothing is uploaded, and nothing has to be installed.
Three ways to open a notebook
- Paste a GitHub link, or
owner/repo, or a path ending in.ipynbinto the box on the home page. - Change
nbviewer.orgtonbview.orgin a link you already have. The/github/...,/gist/...and/url/...paths all work the same way. - Link directly. A GitHub notebook is
and/github/{owner}/{repo}/blob/{branch}/{path}.ipynb?cell=Nopens it scrolled to cell N.
What renders
- Markdown cells, including LaTeX math and inline HTML that the notebook already contains.
- Code with syntax highlighting, optional line numbers and wrapped lines.
- Saved output: printed text, tables, images and attachments, charts, and error output with its traceback.
- A link that keeps pointing at the right version: Copy link names the commit the notebook was read at, so a link still shows the same notebook after the branch moves on.
What GitHub’s own file view does not do
GitHub can display many notebooks in its web interface. nbview adds the things a review, a paper or a blog post usually needs:
- a diff against another version of the same file, or against a different notebook
- an embeddable frame at
/embed/github/{owner}/{repo}/blob/{branch}/{path}.ipynbthat other sites may frame - exports: a clean
.ipynbwithout outputs, a.pyscript, Markdown, and a standalone HTML page that the browser prints or saves as PDF - notebooks from private repos without installing a GitHub App, using a read-only token you create
- an installable app whose page still opens with no network, in either theme; the notebook itself always comes from GitHub
What it cannot do
- Run code. nbview has no kernel; it shows the outputs that were saved into the file.
- Invent outputs that were never saved. A notebook committed with cleared outputs shows its code only.
- Play interactive widgets. Widget output appears as the static state that was saved.
What it does with your notebook
Public files are fetched from raw.githubusercontent.com by your browser, and private files from api.github.com with a token kept in this browser’s storage. There is no nbview server holding a copy. Remote images inside a notebook are held behind a button that names their host, so opening a notebook does not contact the sites it embeds until you ask it to.
nbview is a free, open-source notebook viewer. It is an independent project and is not affiliated with Project Jupyter or nbviewer. Read the README, or see what changed, or read the privacy note.