ipynbtopdfscanner

How to Convert a Jupyter Notebook (.ipynb) to PDF: 4 Easy Ways

Four ways to convert a Jupyter notebook (.ipynb) to PDF: an online converter, JupyterLab export, nbconvert and browser print, with pros and cons of each.

Updated · by the ipynbtopdfscanner team

Quick answer: The quickest way is to open the .ipynb file in a browser-based converter such as ipynbtopdfscanner and press Download PDF: no installation needed. If you prefer the command line, run jupyter nbconvert --to webpdf notebook.ipynb (needs pip install "nbconvert[webpdf]") or jupyter nbconvert --to pdf notebook.ipynb (needs LaTeX and pandoc).

Way 1: Online converter (no installation)

  1. Open ipynbtopdfscanner on your phone or computer.
  2. Choose your .ipynb file, or drag it onto the page.
  3. Check the live page preview. Hide any cells you don’t need, and add your name if it’s an assignment.
  4. Press Download PDF.

The notebook is converted inside your browser and never uploaded. Long code lines wrap, wide tables shrink to fit, and nothing is split across two pages.

Way 2: Export from JupyterLab or Jupyter Notebook

All of these call nbconvert behind the scenes, so they need the same tools as Way 3. Without them you get errors such as “xelatex not found”.

Way 3: The nbconvert command

WebPDF uses a headless Chromium browser and needs no LaTeX:

pip install "nbconvert[webpdf]"
jupyter nbconvert --to webpdf --allow-chromium-download notebook.ipynb

The classic PDF exporter goes through LaTeX, so it needs a TeX distribution (MiKTeX, MacTeX or TeX Live) and pandoc:

jupyter nbconvert --to pdf notebook.ipynb

Way 4: Print from the browser

Open the notebook in Jupyter and press Ctrl + P (Cmd + P on Mac), then choose “Save as PDF”. It is quick but often cuts off long code lines and wide tables, and can split images across pages.

Which way should you use?

MethodInstall neededLong code & wide tablesWorks on phone
Online converter (ipynbtopdfscanner)NoneWrapped / shrunk to fitYes
nbconvert WebPDFPython + ChromiumOften cut offNo
nbconvert PDF (LaTeX)Python + LaTeX + pandocLong lines run off the pageNo
Browser printNoneOften cut offPartly

Skip the setup: convert your notebook to PDF in your browser, free and private.

Open the converter

Frequently asked questions

What is an .ipynb file?

An .ipynb file is a Jupyter Notebook: a JSON file that stores code cells, text (markdown) and the outputs such as tables and charts. It is used by Jupyter, JupyterLab, Google Colab, Kaggle and VS Code.

Can I convert ipynb to PDF without Jupyter installed?

Yes. A browser-based converter reads the .ipynb file directly, so you don’t need Jupyter, Python or LaTeX.