Quick Navigation
nbviewer is a web application that allows you to enter the URL of a Jupyter Notebook file and renders that notebook as a static HTML web page, providing a stable link you can share with others. nbviewer also supports browsing collections of notebooks (e.g., in a GitHub repository) and rendering notebooks in other formats (e.g., slides, scripts).
nbviewer is part of the Jupyter Project, an open-source project that includes other projects such as Jupyter Notebook, JupyterLab, and JupyterHub.
This site is built on top of nbviewer.
You can use it to render Jupyter Notebooks or browse notebook collections on GitHub. Compared to the main nbviewer.org site, we have replaced resources that are difficult to access in China, such as cloudflare and unpkg. Due to the open format of notebooks, we cannot guarantee that external resources referenced in notebook images will display properly.
nbviewer is written in Python and JavaScript, uses nbconvert to render notebooks, and uses Tornado as its web server.
You can install nbconvert and run jupyter nbconvert to get the same functionality (and more). See the nbconvert documentation for details.
nbviewer does not execute notebooks. It only renders the inputs and outputs saved in the notebook document as a web page.
mybinder.org is a separate web service that allows you to open notebooks in an executable environment, making your code immediately reproducible by anyone, anywhere. nbviewer displays an Execute on Binder icon in its navigation bar.
nbviewer only supports notebooks stored on GitHub or as a Gist on Binder. Binder can directly support other providers on the mybinder.org website.
Binder attempts to build a Docker image containing the notebook and requirements declared in the git repository. The build will fail if the repository has issues with the following files:
Dockerfilerequirements.txtenvironment.yamlWe recommend having the repository owner resolve the issue.
Binder attempts to build a Docker image containing the notebooks and requirements in the git repository. These notebooks may have requirements needed to run correctly, such as libraries and data files. If the git repository declares these prerequisites in a supported way, Binder can install these prerequisites during its build process.
If a notebook doesn't run correctly in its Binder environment, we recommend letting the repository owner know about the issue or submitting a pull request to help resolve it.
Yes. This site allows plots from plot.ly, Bokeh, and Altair to remain interactive. For example, when you visit a page, any arbitrary JavaScript on that page may be executed, just like any page you visit on the internet.
ipynb.cn can only render notebooks accessible on the public internet. If you're working on a notebook on your local computer, you need to publish that notebook at a public URL (e.g., in a GitHub repository, as a gist) so that ipynb.cn can render it.
Hosting your own nbviewer server can open up other avenues for rendering private notebooks. For example, an nbviewer server on your university network could render notebook files accessible via URLs on that network. See the README in the nbviewer repository on GitHub for instructions and options.
The URL you're accessing most likely points to a notebook that has been moved or deleted. If you clicked a link on a site that led to a 404 error page, we recommend contacting the site owner to report the broken link. If a notebook author provided you with a URL, we suggest asking them for an updated link.
If you notice one of the links on ipynb.cn, please report it in the nbviewer issue tracker.
nbviewer fetches notebook files from upstream providers (such as GitHub, GitHub gist, public web servers). If the provider doesn't respond, the file received by nbviewer is invalid, the file is not publicly accessible, etc., a 4xx error will be displayed.
If you believe nbviewer is incorrectly displaying a 4xx error for an accessible, valid notebook URL, please submit a bug report in the nbviewer issue tracker.
A 5xx error or Fastly's error page may indicate that the public ipynb.cn website is being redeployed or is down. If the problem persists for more than a few minutes, please open a bug report in the nbviewer issue tracker on GitHub, including the URL you were accessing and the error you received.
To reduce rendering time for popular notebooks, nbviewer caches rendered notebooks. The cache duration on ipynb.cn is approximately 10 minutes.
To invalidate the cache and force nbviewer to re-render a notebook page, add ?flush_cache=true to the URL.
nbviewer does not store any notebooks, it only renders notebooks stored on the web when given their URL. If you've discovered a notebook that should be removed from the web, you need to find where it's hosted (e.g., GitHub) to update or delete it.
No. However, you can install nbconvert locally and run jupyter nbconvert to convert notebook files to various formats. See the nbconvert documentation for details.
Our server source is hosted overseas for convenient access to notebook resources on the network, with high-speed access provided through Alibaba Cloud Global CDN.
Yes. Please use https.
Absolutely. See the README file in the nbviewer repository for instructions and options.
Please select an appropriate issue template in the nbviewer issue tracker GitHub page.
Please post questions about using nbviewer on the following platforms:
If you want to propose enhancements to nbviewer or file bug reports, please open an issue in the jupyter/nbviewer project's issue page.