Method using Google Colab only

  1. Download your .ipynb file

You can actually do it using only Google Colab. File -> Download .ipynb


  1. Reupload it so Colab can see it

Click on the Files icon on the far left:

Then Upload to session storage:

Select & upload your .ipynb file you just downloaded.


  1. Get your file's path

then obtain its path (you might need to hit the Refresh button before your file shows up):


  1. Conversion using %%shell

Then, just as in Julio's answer, execute in a Colab cell:

%%shell
jupyter nbconvert --to html /PATH/TO/YOUR/NOTEBOOKFILE.ipynb

The %%shell lets the interpreter know that the following script is interpreted as shell. Don't write anything before %%shell, use a distinct cell for this.

The form of /PATH/TO/YOUR/NOTEBOOKFILE.ipynb will be something like /content/lightaberration3.ipynb.


  1. Your file is ready

Might need to click Refresh again, but your notebook.html will appear in the files, so you can download it:


The great thing about this is that nothing python-related has to be installed on your computer, not conda, not pip, only a browser.

Answer from zabop on Stack Overflow
🌐
Runcell
runcell.dev › tool › ipynb-to-html
Jupyter to HTML Converter (.ipynb → .html) — Free
Free online tool to turn .ipynb notebooks into HTML with a live preview. Export notebooks as shareable web pages in seconds.
Discussions

python - Convert ipynb notebook to HTML in Google Colab - Stack Overflow
I have a Google Colaboratory Notebook for Data Analysis that I want to output as a HTML file as currently not everything loads within the Colab environment such as large Folium Heatmaps. Is it poss... More on stackoverflow.com
🌐 stackoverflow.com
python - Jupyter (IPython) notebook: Convert an HTML notebook to ipynb - Stack Overflow
I have converted a Jupyter/IPython notebook to HTML format and subsequently lost the original ipynb file. Is there a simple way to generate the original notebook file from the converted HTML file? More on stackoverflow.com
🌐 stackoverflow.com
python - How to convert IPython notebooks to PDF and HTML? - Stack Overflow
I just upload the .ipynb file, choose PDF, and download it within seconds. No installations, no command line, no setup issues. It runs in the cloud, uses SSL encryption, and deletes files after 24 hours. If you want a quick and hassle-free solution, this site is the easiest option. 2026-02-26T08:04:45.92Z+00:00 ... Save this answer. ... Show activity on this post. Also pass the --execute flag to generate the output cells · jupyter nbconvert --execute --to html ... More on stackoverflow.com
🌐 stackoverflow.com
Comparing Qwen3.5 vs Gemma4 for Local Agentic Coding
Assuming you're using the latest llama.cpp, try testing Gemma 4 with https://github.com/ggml-org/llama.cpp/blob/master/models/templates/google-gemma-4-31B-it-interleaved.jinja . More on reddit.com
🌐 r/LocalLLaMA
93
135
4 weeks ago
People also ask

Can I convert .ipynb to HTML online?
Yes. Runcell’s free browser‑only converter (runcell.dev/tool/ipynb-to-html) turns your notebook into HTML without uploading data to a server.
🌐
docs.kanaries.net
docs.kanaries.net › topics › Python › ipynb-to-html
How to Convert .ipynb to HTML – Kanaries
What is an IPYNB file?
An IPYNB file is the standard format used by Jupyter Notebook. It can include code, text, equations, and visualizations, which makes it popular in data science and research.
🌐
code-format.com
code-format.com › tool › converter_ipynbtohtml
Convert IPYNB to HTML Online – Export Jupyter Notebooks to HTML
How to convert IPYNB to HTML in Google Colab?
In Google Colab there is no direct export to HTML. Download your notebook (File → Download .ipynb) and run !jupyter nbconvert --to html your_notebook.ipynb in a Colab cell.
🌐
code-format.com
code-format.com › tool › converter_ipynbtohtml
Convert IPYNB to HTML Online – Export Jupyter Notebooks to HTML
🌐
Vertopal
vertopal.com › en › convert › ipynb-to-html
Online IPYNB (Jupyter Notebook) to HTML Converter - Vertopal
Convert IPYNB (Jupyter Notebook) documents to HTML file format using Vertopal free online converter tools. You can edit and optimize your documents.
🌐
TheOnlineConverter
theonlineconverter.com › convert-ipynb-to-html
Free IPYNB to HTML Converter - Online Converter
Convert Jupyter Notebook (.ipynb) to HTML in seconds. No install needed. Preserve code, markdown, and outputs. Fast, free, and secure!
🌐
VCF Viewer
htmtopdf.herokuapp.com › ipynbviewer
Jupyter Notebooks(ipynb) Viewer and Converter
This online app allows you to convert Jupyter Notebooks (ipynb) to HTML, PDF format. It is easy to use, With just a few clicks, you can get the converted HTML or PDF, and View this file from your browser directly.
Top answer
1 of 7
77

Method using Google Colab only

  1. Download your .ipynb file

You can actually do it using only Google Colab. File -> Download .ipynb


  1. Reupload it so Colab can see it

Click on the Files icon on the far left:

Then Upload to session storage:

Select & upload your .ipynb file you just downloaded.


  1. Get your file's path

then obtain its path (you might need to hit the Refresh button before your file shows up):


  1. Conversion using %%shell

Then, just as in Julio's answer, execute in a Colab cell:

%%shell
jupyter nbconvert --to html /PATH/TO/YOUR/NOTEBOOKFILE.ipynb

The %%shell lets the interpreter know that the following script is interpreted as shell. Don't write anything before %%shell, use a distinct cell for this.

The form of /PATH/TO/YOUR/NOTEBOOKFILE.ipynb will be something like /content/lightaberration3.ipynb.


  1. Your file is ready

Might need to click Refresh again, but your notebook.html will appear in the files, so you can download it:


The great thing about this is that nothing python-related has to be installed on your computer, not conda, not pip, only a browser.

2 of 7
42

Google Colab doesn't currently have such a feature as a built-in.

Your best route is to first download it through File > Download .ipynb and then use the standard tool for Jupyter Notebook conversion, nbconvert:

jupyter nbconvert --to html notebook.ipynb

If you use an Anaconda Python distribution, nbconvert is most likely already installed. If not, refer to what is described in their install instructions to be able to convert:

pip install nbconvert
# OR
conda install nbconvert
Find elsewhere
🌐
Code-format
code-format.com › tool › converter_ipynbtohtml
Convert IPYNB to HTML Online – Export Jupyter Notebooks to HTML
Free IPYNB to HTML converter. Turn Jupyter Notebooks into HTML pages online — no setup required.
🌐
MConverter
mconverter.eu › convert › ipynb › html
IPYNB to HTML Converter • Online & Free • MConverter
Batch convert IPYNB to HTML online. Convert large IPYNB files up to 10 GB each. Fast and easy exporting from IPYNB to HTML in bulk.
🌐
Kanaries
docs.kanaries.net › topics › Python › ipynb-to-html
How to Convert .ipynb to HTML – Kanaries
July 14, 2025 - A practical guide to turning Jupyter Notebooks (.ipynb) into share‑ready HTML pages. Includes a free online converter, command‑line instructions that require **no extra installations**, tips for VS Code & Colab, FAQs, and more.
🌐
Saturn Cloud
saturncloud.io › blog › convert-ipynb-notebook-to-html-in-google-colab
Convert ipynb notebook to HTML in Google Colab | Saturn Cloud Blog
October 28, 2023 - Nbconvert is a tool that allows you to convert Jupyter notebooks to various formats, including HTML, PDF, and Markdown. To install nbconvert in Colab, you can run the following command in a code cell: ... This will install the nbconvert package in your Colab environment. Now that you have nbconvert installed, you can use it to convert your ipynb notebook to HTML.
🌐
Jupyterconverter
jupyterconverter.com
Convert Jupyter and Markdown Files Online – Free to PDF, Word, IPYNB, or HTML
Convert IPYNB and Markdown files to PDF, Word, HTML, EPUB, PPTX, IPYNB, LaTeX, ODT, RTF, TXT, and more.
Top answer
1 of 3
54

I recently used BeautifulSoup and JSON to convert html notebook to ipynb. the trick is to look at the JSON schema of a notebook and emulate that. The code selects only input code cells and markdown cells

here is my code

from bs4 import BeautifulSoup
import json
import urllib.request
url = 'http://nbviewer.jupyter.org/url/jakevdp.github.com/downloads/notebooks/XKCD_plots.ipynb'
response = urllib.request.urlopen(url)
#  for local html file
# response = open("/Users/note/jupyter/notebook.html")
text = response.read()

soup = BeautifulSoup(text, 'lxml')
# see some of the html
print(soup.div)
dictionary = {'nbformat': 4, 'nbformat_minor': 1, 'cells': [], 'metadata': {}}
for d in soup.findAll("div"):
    if 'class' in d.attrs.keys():
        for clas in d.attrs["class"]:
            if clas in ["text_cell_render", "input_area"]:
                # code cell
                if clas == "input_area":
                    cell = {}
                    cell['metadata'] = {}
                    cell['outputs'] = []
                    cell['source'] = [d.get_text()]
                    cell['execution_count'] = None
                    cell['cell_type'] = 'code'
                    dictionary['cells'].append(cell)

                else:
                    cell = {}
                    cell['metadata'] = {}

                    cell['source'] = [d.decode_contents()]
                    cell['cell_type'] = 'markdown'
                    dictionary['cells'].append(cell)
open('notebook.ipynb', 'w').write(json.dumps(dictionary))

here is part of print(soup.div) output

div class="container">
<div class="navbar-header">
<button class="navbar-toggle collapsed" data-target=".navbar-collapse" data-toggle="collapse" type="button">
<span class="sr-only">Toggle navigation</span>
<i class="fa fa-bars"></i>
</button>
<a class="navbar-brand" href="/">
<img src="/static/img/nav_logo.svg?v=479cefe8d932fb14a67b93911b97d70f" width="159"/>
</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li>
<a class="active" href="http://jupyter.org">JUPYTER</a>
</li>
<li>
<a href="/faq" title="FAQ">
<span>FAQ</span>

A screen shot of the resulting ipynb file, loaded on my local jupyter and after running all the cells

2 of 3
3

Note the best answer may need some modification of the tags for it to work in late 2022 and forward

I'm adding this as an answer to highlight comments I made below the nice upvoted Answer.
Note that the current version of the awesome highly upvoted one won't probably work as the HTML tags signaling the various cells has changed. If you happen to have a really old version of HTML made, it may work. However, most of you will have have newer made HTML and you need the new tags to be in the code to distinguish the cells.

See my comments below that highly-voted on post (you'll need to click on 'Show more comments' option at the bottom to reveal all the comments) for a link to a place here to get an active Jupyter session where you can run the code demo right in your browser, without needing to sign in, via MyBinder service with the updated version of the code with the current tags used. See the fist code cell here for a direct source of a static representation of the code. (You don't want the cell magic line that begins %%writefile, just copy everything in that cell below that line.) The tags being different affects a few lines of the original code.

🌐
MLJAR
mljar.com › blog › jupyter-notebook-html
The 3 ways to export Jupyter Notebook to HTML
July 27, 2022 - jupyter nbconvert --to html --no-input my-notebook.ipynb
🌐
Ipynbtopdf
ipynbtopdf.net › ipynb-to-html
IPYNB to HTML Converter Online - IPYNBTOPDF.net
Convert Jupyter notebook files (.ipynb) to HTML format online free. Transform IPYNB to HTML with perfect code, output, and mathematical formulas preservation.
🌐
Free File Converter
freefileconvert.com › home › ipynb converter › ipynb to html
Convert IPYNB to HTML (Free & Online) - FreeFileConvert
Free online tool to convert IPYNB (Jupyter Notebook) files to HTML (Hypertext Markup Language File). No download required. Fast, secure, and 100% free.
Top answer
1 of 16
154

If you have LaTeX installed you can download as PDF directly from Jupyter notebook with File -> Download as -> PDF via LaTeX (.pdf). Otherwise follow these two steps.

  1. For HTML output, you should now use Jupyter in place of IPython and select File -> Download as -> HTML (.html) or run the following command:

     jupyter nbconvert --to html notebook.ipynb  
    

    This will convert the Jupyter document file notebook.ipynb into the html output format.

    Google Colaboratory is Google's free Jupyter notebook environment that requires no setup and runs entirely in the cloud. If you are using Google Colab the commands are the same, but Google Colab only lets you download .ipynb or .py formats.

  2. Convert the html file notebook.html into a pdf file called notebook.pdf. In Windows, macOS (brew install wkhtmltodf) or Linux, install wkhtmltopdf. wkhtmltopdf is a command line utility to convert html to pdf using WebKit. You can download wkhtmltopdf from the linked webpage, or in many Linux distros it can be found in their repositories.

     wkhtmltopdf notebook.html notebook.pdf   
    

Original (now almost obsolete) revision: Convert the IPython notebook file to html.

ipython nbconvert --to html notebook.ipynb

2 of 16
37

Also pass the --execute flag to generate the output cells

jupyter nbconvert --execute --to html notebook.ipynb
jupyter nbconvert --execute --to pdf notebook.ipynb

The best practice is to keep the output out of the notebook for version control, see: Using IPython notebooks under version control

But then, if you don't pass --execute, the output won't be present in the HTML, see also: How to run an .ipynb Jupyter Notebook from terminal?

For an HTML fragment without header: How to export an IPython notebook to HTML for a blog post?

Tested in Jupyter 4.4.0.

🌐
Runcell Blog
runcell.dev › blog › nb-convert-tutorial
Jupyter nbconvert: Convert Notebooks to HTML, PDF & Python – Runcell Blog
Jupyter nbconvert lets you export .ipynb notebooks to HTML, PDF, Python scripts, Markdown, slides, and more — directly from the command line.
🌐
University of Illinois at Urbana-Champaign
courses.physics.illinois.edu › phys213 › fa2020 › html-embed-export-tutorial.pdf pdf
Exporting a Jupyter Notebook to HTML with Embedded Images
Make sure the type of the new cell is set to "Code" in the toolbar (not "Markdown"), and then enter the · following code snippet. The initial exclamation marks are important, so please enter it exactly: !pip install jupyter_contrib_nbextensions >/dev/null ... Now, if you run the new code cell, ...
🌐
nbconvert
nbconvert.readthedocs.io › en › latest › usage.html
Using as a command line tool — nbconvert 7.17.1 documentation
This will convert the Jupyter notebook file notebook.ipynb into the output format given by the FORMAT string. In 5.x versions of nbconvert the default output format was html. In 6.0 the default was removed, requiring CLI calls to explicitly set a --to argument in order to execute.