file.wiki

File extensions

How to open a .ipynb file

Jupyter notebook · Source code / data

An .ipynb file is a Jupyter notebook: code, text and saved output in one JSON file. VS Code opens and runs notebooks natively, and Google Colab does it in a browser with nothing installed.

What a .ipynb file actually is

A notebook interleaves executable cells with prose and the output of previous runs, which is why it dominates data science and teaching.

The file itself is JSON. Opening it in a text editor shows the structure, including any results that were saved with it, which matters more than people expect.

Why it will not open

Nothing on a normal machine is associated with .ipynb, and the classic Jupyter workflow requires installing Python plus Jupyter first, which is a lot of setup just to read someone's notebook.

Step by step

Windows

  1. 01Easiest with nothing installed: go to colab.research.google.com and upload the file. It opens and runs in the browser.
  2. 02Locally: install VS Code and the Jupyter extension, then open the .ipynb. It renders cells and output, and can run them if Python is installed.
  3. 03Traditional route: "pip install jupyterlab" then "jupyter lab" in the notebook folder.
  4. 04To just read one that is on GitHub, GitHub renders notebooks directly in the browser.

macOS

  1. 01Same options. VS Code with the Jupyter extension, or Colab in a browser.
  2. 02Install Python first with "brew install python" if you intend to run cells.

What usually goes wrong

Notebooks save their output, including secrets

A notebook stores whatever the cells printed last time they ran. That can include API keys, database rows and personal data. Clear all outputs before sharing one, especially before committing it to a public repository.

Programs that open .ipynb

Our pick, in order. Every one links to the publisher's official download URL and the SHA-256 hash of the installer, so you can check the file before you run it.

Common questions

How do I open an .ipynb file without installing anything?
Upload it to Google Colab in a browser, which opens and runs notebooks for free. GitHub also renders any notebook you push to it.
Can VS Code open Jupyter notebooks?
Yes, natively with the Jupyter extension. It renders the cells and saved output, and runs them if you have Python installed.

Related formats