Nbview: a client-side notebook viewer as a fallback when nbviewer is down

Hi all,

I use nbviewer a lot for sharing notebooks, and when it’s been unavailable I’ve wanted a fallback, so I built a small one: nbview.org.

It’s fully client-side. The browser fetches the .ipynb straight from raw.githubusercontent.com and renders it locally, so there’s no server doing the rendering. It’s a static site, and the code is MIT licensed:

What it supports so far:

  • Browsing public GitHub users, orgs and repos, and opening notebooks from them
  • Pasting an nbviewer.org URL, which opens the same notebook
  • Markdown with KaTeX math, highlighted code, HTML tables, PNG/JPEG/SVG outputs, ANSI-colored tracebacks, attachments
  • Opening a local .ipynb without uploading it anywhere
  • Links in the same URL pattern as nbviewer, e.g. nbview.org/#/github/owner/repo/blob/main/nb.ipynb

Known limits:

  • JavaScript outputs (ipywidgets, Plotly, Bokeh) aren’t executed, for safety. A note points to Colab instead.
  • Public GitHub repos only, plus any direct .ipynb URL that allows cross-origin requests
  • Folder browsing uses the GitHub API (60 requests/hour per visitor without a token). Opening notebooks doesn’t count toward that.

This isn’t meant to replace nbviewer, which does a lot more. I’d love feedback, especially notebooks that render badly, since edge cases in nbformat are where I expect bugs.

Thanks to everyone who maintains nbviewer and nbformat. Reading their work made this much easier to build.

The Jupyter community offers MyBinder where users don’t need accounts. That and JupyterLite have the advantage they are standard,current open-source Jupyter, which Google Colab is not. JupyterLite supports ipywidgets and Plotly. Bokeh has Panelite that supports it and is built on JupyterLite, see here.

Thanks, that’s a fair point, and a better pointer for this community than Colab. I’m adding an “Open in Binder” button next to the Colab one, and I’ll mention both in the note for JS outputs. I’ll look at JupyterLite for a client-side route too, since that fits the no-server idea.

Small corrections to my post: pasting nbviewer.org/github/… links works (the /url/ and /gist/ forms don’t yet), and you can now just swap the domain, so [nbview].org/github/owner/repo/blob/main/nb.ipynb works. gist.github.com links open too. Still very much a fallback, not a replacement for nbviewer.