Jupyter Notebook to PDF
Turn a Jupyter notebook (.ipynb) into a PDF to share or hand in: Markdown text, code, results, tables and charts, laid out on real pages with searchable text. No Python, LaTeX or Jupyter needed, and the notebook stays on your device.
- Files stay on your device. Nothing is uploaded.
- Free, no sign-up, no daily limit.
- Works with Wi-Fi off once the page has loaded. Check it yourself
Updated by Khokhar Sab
How do I convert a Jupyter notebook to PDF?
Press Choose a notebook and pick the .ipynb file. Choose whether to show code, outputs and cell numbers, and pick the paper size. Press Convert to PDF, check the preview and press Download. Run the notebook and save it first, because the PDF shows the outputs stored in the file rather than running the code again.
- In Jupyter or VS Code, run all cells and save the notebook.
- Press Choose a notebook and pick the .ipynb file.
- Tick or untick Show code, Show outputs and Show cell numbers.
- Press Convert to PDF, then Download.
Why not use File, Download as PDF in Jupyter?
Jupyter's own PDF export goes through nbconvert, which needs Pandoc, XeLaTeX and Playwright installed separately, according to its documentation. On a computer without them, the export fails. This tool needs nothing installed: it reads the notebook file in your browser, so it also works on a school or work computer where you cannot install software.
The nbconvert installation page is listed in the sources below.
What does the PDF keep from the notebook?
Everything saved in the file: Markdown with headings, lists, tables, links and pictures; code cells with their In [n]: numbers; printed text; result tables from pandas; charts saved as PNG, JPEG or SVG; and error messages, with color codes removed. Interactive widgets and charts that need a running notebook show their saved text form instead.
| In the notebook | In the PDF |
|---|---|
| Markdown headings and text | kept as real text, title used as the PDF title |
| Code cells with In [n]: numbers | kept, in a monospace box |
| pandas table (HTML output) | kept as a table, all 3 rows |
| Printed output (print) | kept |
| Bar chart (PNG output) | kept as a picture |
| Error with colored traceback | kept, color codes removed |
Is it safe to convert a notebook here?
Yes. The notebook is read on your device and never uploaded, which matters for coursework, research data and company notebooks. No code from the notebook runs, and HTML outputs such as tables are cleaned before they are drawn, so scripts or forms saved in outputs cannot do anything. The PDF holds only text, shapes and pictures.
For Markdown files outside a notebook, use Markdown to PDF.
Limits and fixes
- Math formulas written in LaTeX ($x^2$) appear as their source text, not typeset.
- Interactive charts (Plotly, Bokeh, widgets) show their saved text or picture only; save them as PNG in the notebook for a picture in the PDF.
- Long lines of code wrap onto the next line instead of running off the page.
Frequently asked questions
Is it free?
Yes, with no sign-up, no watermark and no daily limit.
Is my notebook uploaded?
No. It is read and converted in your browser.
Does it run my code?
No. It shows the outputs already saved in the notebook.
Does it work with VS Code and Google Colab notebooks?
Yes. They save the same .ipynb format; download the file first.
Does it work on a phone?
Yes, in current browsers on iPhone and Android.
Related PDF tools
How this tool was built and tested
- nbformat documentation: The Notebook file format: the .ipynb structure the tool reads
- nbconvert documentation: Installation: Pandoc, XeLaTeX and Playwright needed for Jupyter's own export
- markdown-it (MIT) and DOMPurify (Apache-2.0): render Markdown and clean HTML outputs