ipynb Viewer
Open .ipynb files in your browser and read them like Jupyter: math, code, tables, charts and errors.
💡 Notebooks are read inside this browser and never uploaded. Code is not run, and images from other sites are not loaded.
Convert to .py, Markdown, HTML or PDF. No upload.
Choose an .ipynb file or drop it here, and the notebook is shown in the same order as in Jupyter: Markdown with math, highlighted code, and the saved tables, charts and errors.
Save the notebook as a .py script in the percent format or the nbconvert format, as Markdown, as HTML or as PDF. You can also save a copy with all outputs removed.
Open a percent-format .py script (cells marked with # %%) to split it into cells and save it as .ipynb. Code is never run.
ipynb Viewer: Features
What an .ipynb file is
An .ipynb file is the notebook format of Jupyter Notebook and JupyterLab. It is JSON that keeps notes, code and the results of running that code, cell by cell, in one file.
Because the results are saved too, tables and charts can be read without running the code again. This tool shows those saved results.
The current format is version 4, and cells have ids from version 4.5. Older version 3 notebooks are converted to version 4 in the same way as Jupyter's nbformat does.
| Cell | Contents |
|---|---|
| Code | Python or other code, with its saved outputs: text, tables, images and errors |
| Markdown | Headings, text, tables, math ($…$ and $$…$$) and images |
| Raw | Text that converters copy as it is |
Ways to open an .ipynb file
Besides Jupyter, notebooks open in VS Code and Google Colab. Pick one depending on whether you need to run the code or only read it.
This tool is for reading. It needs no installation and no account, so it also works on computers without Python and in phone browsers.
| Option | Installation | Runs code | Where the file goes |
|---|---|---|---|
| This tool | None | No (shows saved outputs) | Stays in your browser |
| Jupyter (JupyterLab or Notebook) | Python and Jupyter | Yes | Your computer |
| VS Code | VS Code and its Jupyter extension | Yes (Python needed) | Your computer |
| Google Colab | None | Yes | Google servers (Google account needed) |
Two ways to turn a notebook into .py
There are two common script formats, and this tool can save both.
- Percent format: each cell starts with a
# %%line. Spyder introduced it, and editors such as VS Code and Spyder treat these blocks as cells you can run one at a time. Markdown cells become comments under# %% [markdown]. - nbconvert format: the same output as
jupyter nbconvert --to python(--to scriptfor other languages). Each code cell starts with# In[1]:, and the result runs as one plain Python script.
Lines such as %matplotlib inline and !pip install are commented out in the percent format, as Jupytext does, and turned into get_ipython() calls in the nbconvert format, as nbconvert does.
A percent-format .py file can be opened here and saved back as .ipynb. Outputs are not included, because the code has not been run.
| Format | Good for |
|---|---|
| Percent format | Running cells in an editor, reviewing diffs in Git, converting back to .ipynb later |
| nbconvert format | Running the notebook as a plain script on a server or on a schedule |
Remove outputs before committing to Git
A notebook saves its outputs, so every new run changes the file and shows up in Git diffs. Images in the outputs also make the file large.
Outputs may also contain data you printed, or even passwords. Removing them is safer before sharing a notebook or publishing it.
The .ipynb without outputs removes the same items as nbstripout does by default and writes the file in the same form as nbstripout. Version 3 notebooks are saved as version 4.
- Outputs and execution counts
- The notebook signature and widgets metadata
- The cell metadata collapsed, scrolled, ExecuteTime, execution, hidden and heading_collapsed
Cell ids are renumbered from 0, as nbstripout does. Tick Keep cell ids to keep the original ids.
What can and cannot be shown
Markdown cells are rendered as Markdown, and math is drawn with KaTeX. Jupyter uses MathJax, so a few commands may not render here.
Outputs show tables (such as pandas DataFrames), images (PNG, JPEG and SVG), text and errors. Error messages keep their colors, as in Jupyter.
The following are not shown. When the notebook also saved an image or text form, that form is shown instead.
- Interactive parts such as widgets and Plotly charts (scripts are never run)
- Images hosted on other sites (loading them would tell those sites that the notebook was opened)
- Images from files on your computer (a web page cannot read them)
- Video and audio
Privacy
Notebooks are read inside your browser. Files are never uploaded, and they are gone when you close the page.
Scripts in Markdown cells and outputs are removed before display, and images and fonts from other sites are not loaded. Links open in a new tab only when you click them.
ipynb Viewer: FAQ
Can I open notebooks on a phone or iPad?
Yes. This is a web page, so choose the file in your browser and it is displayed without installing an app.
Can I run the code?
No. This tool shows the outputs saved in the file.
To run code, use Jupyter, VS Code or Google Colab.
Why is some math shown in red?
KaTeX cannot draw that command. Jupyter uses MathJax, and commands that only MathJax supports are not available here.
Math that cannot be drawn is shown as its source text in red.
Why is my Plotly chart not shown?
Interactive charts are drawn by scripts, which this tool does not run. If the notebook also saved an image of the chart, the image is shown.
Charts saved as images, such as matplotlib figures, are shown as they are.
Which .py format should I choose?
Choose the percent format to run cells in an editor or to convert the script back to .ipynb later.
Choose the nbconvert format to run the notebook as a plain Python script.
What is the difference between the two Markdown options?
Markdown with images follows nbconvert --to markdown. Images are saved as separate files, and the Markdown and images are saved together as a ZIP. They display on GitHub as well.
Markdown, text only is a single .md file without images. It suits cases where you only need the text, code and text outputs, for example when giving the notebook to an AI assistant.
How do I make a PDF?
Press Print / PDF and choose Save as PDF in your browser's print dialog. Only the notebook is printed.
Does removing outputs change my original file?
No. The notebook without outputs is saved as a new file.
Can it open large notebooks?
Yes. In Chrome on our test computer, a 26 MB notebook with 1,500 cells and 600 images was displayed in about one second, and every export finished in about one second.
Phones take longer.
Can I open notebooks made in Google Colab?
Yes. Colab notebooks use the same .ipynb format.
Is my notebook uploaded anywhere?
No. It is read inside this browser only and is gone when you close the page.
How to Use ipynb Viewer
-
Open an .ipynb file
Press Choose a file or drop the file here. Open the sample to see an example notebook.
-
Read the notebook
Notes, code and outputs appear in the same order as in Jupyter. Toggle Code and Outputs, or jump to a section from the list of headings.
-
Convert and save
Press the button for the format you need: .py, Markdown, HTML, PDF or .ipynb without outputs.
Category Code