Return to main page

How to convert a Google Colab notebook (.ipynb) file to HTML

This process explains how to convert a Jupyter notebook (.ipynb) in Google Colab to an HTML file.  

As of June 2025, there does not appear to be a way to download or convert a notebook in Google Colab directly to HTML.  There is not an option under the File >> Download menu.

Step 1: Create and run your Colab notebook

Make sure you have run all the cells. Here’s an example.

Step 2: Download the notebook as a .pynb file

From the Colab top menu, click on File >> Download >> Download .ipynb

This will download the notebook to your computer -- look for it in your downloads folder.  In this case the file name is ExampleNotebook.ipynb.

Step 3: Upload the .ipynb file to a new Colab notebook

Open a new notebook in Google Colab:  File >> New notebook in Drive

In the new notebook that just opened up, click on the folder icon that’s on the left hand panel.

It will expand the left hand panel like this:

Click on the file upload icon and then select the .ipynb file from your computer. You will then see it listed under the Files panel:

Hover over the file name and you will see 3 vertical dots appear:

Click on the 3 dots and then select “Copy path”:

Step 4: Convert to HTML and download

Go to the first cell in the notebook and enter this command. You can paste the path to the file (in this case “/content/ExampleNotebook.ipynb”) with ctrl+v or Edit >> paste:

!jupyter nbconvert --to html /content/ExampleNotebook.ipynb

Run this cell. You should see output like this.  If you see something different or get errors then you’ll need to double check that the file is uploaded and the command is correct.

After a moment, you will also see a new .html file listed under the Files panel. Click on the 3 dots next to the html file name and select Download. This will download the html file to your computer.

Once it is downloaded you should be able to open it in a browser - the screenshot below shows the html file opened from the local computer: