Torna al blog

How to Convert IPYNB to PDF on macOS (3 Quick Methods)

The fastest ways to convert Jupyter Notebooks to PDF on a Mac in 2026 — with or without Python, with or without LaTeX. Includes a Homebrew nbconvert setup and a no-install browser option.

  • #macos
  • #guide
  • #ipynb-to-pdf

macOS is the most popular OS for data science work, and fortunately it's also one of the easiest platforms for converting Jupyter Notebooks to PDF. This guide walks through the three methods that actually work on a Mac in 2026, ranked from fastest to most-configurable.

Method 1 — Online Converter (No Install, 3 Seconds)

If you just need a PDF and don't want to think about toolchains, use a browser-based converter like ipynbtopdf.org:

  1. Open the site in Safari, Chrome, or any browser.
  2. Drag your .ipynb file onto the page.
  3. Download the PDF ~3 seconds later.

This works on every Mac from the last decade, including MacBooks with M1/M2/M3/M4 chips, Mac minis, and even iPhones and iPads. No Python, no Homebrew, no LaTeX.

Method 2 — nbconvert via Homebrew + MacTeX

If you already have Python and want the canonical local path:

# Install Jupyter + nbconvert
brew install [email protected]
pip install jupyter nbconvert

# Install a TeX distribution (required for --to pdf)
brew install --cask mactex-no-gui

Then convert:

jupyter nbconvert --to pdf notebook.ipynb

Heads up: full MacTeX is ~6 GB. mactex-no-gui is smaller (~2 GB) and drops the GUI tools you don't need. After install, restart your terminal so xelatex is on your PATH.

If you hit errors like xelatex: command not found or UnicodeEncodeError, see our nbconvert troubleshooting guide — both have simple fixes.

Method 3 — nbconvert --to webpdf (No LaTeX)

The LaTeX-free path for Mac users who have Python but not TeX.

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

This uses headless Chromium to render the notebook and print to PDF. On Apple Silicon, playwright install chromium pulls down an arm64 build automatically — no Rosetta required.

Pros: No 2 GB TeX download. Output matches what you see in JupyterLab. Cons: ~300 MB Chromium download on first use.

Method 4 — HTML Export + Safari Print

Old reliable, and surprisingly nice on macOS because Safari's PDF engine is excellent.

jupyter nbconvert --to html notebook.ipynb
open notebook.html

In Safari: Cmd + P → PDF → Save as PDF. Safari's output tends to have crisper fonts than Chrome's print-to-PDF, especially on Retina displays.

Apple Silicon Notes

If you're on M-series silicon:

  • Python: Use [email protected] from Homebrew — it ships native arm64 wheels.
  • MacTeX: Works natively on arm64. No Rosetta needed.
  • Playwright Chromium: Arm64 build is auto-selected.
  • Online converters: Browser rendering is native — Safari and Chrome on M-series chips are among the fastest PDF rendering paths available.

Which Should You Pick?

Your situationBest method on macOS
No Python, just need a PDFipynbtopdf.org
Have Python, don't want LaTeXnbconvert --to webpdf
Have Python, want maximum fidelity, don't mind TeXnbconvert --to pdf
Want to hand-tweak print CSSHTML export + Safari print

Conclusion

Mac users have it easy: pick any of the methods above and you'll have a clean PDF in under a minute. For most people — especially anyone who's ever lost an afternoon to a broken MacTeX install — the online converter is the fastest, lowest-friction option. For everyone else, webpdf gives you the quality of nbconvert without the LaTeX headache.

How to Convert IPYNB to PDF on macOS (3 Quick Methods) | Convertitore IPYNB in PDF