ipynb to pdf

Split a notebook

One notebook in,a file per chapter out.

Long notebooks are hard to read and worse to review. Choose an .ipynb and cut it into separate notebooks — one per heading, or every N cells — with each part keeping its own code, outputs and images.

Split in your browser — the notebook is never uploaded. You can also drop it anywhere on this page.

  • Jupyter Notebook
  • JupyterLab
  • Google Colab
  • VS Code
  • Kaggle
  • Deepnote

0 bytes uploaded

The notebook is parsed and split on your device.

1 → N notebooks

As many parts as your headings — or your chunk size — produce.

nbformat 3 + 4 read

Modern notebooks and the legacy worksheet format.

100% of the outputs kept

Plots, tables, text and tracebacks stay with their cells.

How the cut is made

Every part opens with its own heading.

A split is a partition, not a conversion: the cells are divided whole, so nothing is rewritten and nothing is lost at the seams.

Chapters become files

Every markdown cell that starts with a level-1 heading opens a new notebook, carrying the heading with it. Choose level 1–2 or 1–3 when sections deserve their own files.

Or split by size

Notebooks without headings can still be divided: pick a cell count and every N cells become one file, in order, with no cell cut in half.

Outputs travel with the code

Plots, tables, stream text and tracebacks stay under their cells with their execution counts, so each part reads the way the original did.

Named so they sort

Files are numbered and slugged from the heading — notes-01-intro.ipynb, notes-02-cleaning-data.ipynb — so a file manager keeps the notebook order.

Compatibility

Reads everything Jupyter writes.

Notebooks from Jupyter, JupyterLab, Colab, Kaggle, Deepnote and VS Code split the same way, including the older nbformat 3 files.

Reads

  • nbformat 4 notebooks
  • Legacy nbformat 3 worksheets
  • Colab and Kaggle downloads
  • VS Code and Deepnote exports

Writes

  • nbformat 4.5 per part
  • unique deterministic cell ids
  • the original kernel and language
  • one .ipynb per part

Keeps

  • source byte for byte
  • outputs and execution counts
  • markdown attachments
  • cell metadata and tags

Does not do

  • cut a cell in half
  • re-run or clear outputs
  • build a table of contents
  • split a .py or .html export

How it works

Three steps to separate notebooks.

Long notebooks are hard to read and worse to review. Choose an .ipynb and cut it into separate notebooks — one per heading, or every N cells — with each part keeping its own code, outputs and images.

  1. 01

    Choose the notebook

    Pick the .ipynb or drop it on the page; it is parsed on your device as it arrives.

  2. 02

    Pick the cut

    Split at headings — level 1 only, or 1–2 and 1–3 — or choose a fixed number of cells per file.

  3. 03

    Download the parts

    Each file has its own button, and “Download all files” saves the set in order.

Every route to a split notebook

Splitting is not a format conversion, so nbconvert cannot do it. These are the routes that can — the browser above, a short script, or by hand.

Why jupyter nbconvert cannot split

nbconvert converts a notebook to another format (--to html, --to markdown, --to script); it has no partition step, because “split” has no output format to name. Searching for a --split flag in nbconvert is a dead end; the page above is the equivalent in a browser.

A short nbformat script

The reproducible route: read the notebook with nbformat.read, slice nb.cells at each heading index, write each slice with nbformat.write. It is the same partition this page performs — worth keeping when the split belongs in a build step.

JupyterLab and VS Code, cell by cell

Neither editor has a split action: the manual route is copy on the cells you want, File → New → Notebook, then paste. It works for one extraction, but it is slow for a forty-chapter notebook and easy to drop outputs on the way.

In a hurry? The rule panel is the whole workflow.

Choose the notebook, pick headings or a cell count, download the parts — no Python, no nbconvert, no temporary scripts.

What a split keeps (and what it recomputes)

  • Source as written — every code and markdown cell, byte for byte.
  • Outputs with execution counts — plots, tables, text and tracebacks.
  • Markdown attachments — inline images keep rendering.
  • Cell metadata — tags, collapsed state and the rest travel along.
  • Recomputed ids — unique inside each part, deterministic across runs.
  • One kernelspec per part — the original notebook’s kernel and language.

FAQ

Split IPYNB: frequently asked questions

Short answers about dividing a notebook — what counts as a heading, how the files are named, and what happens to outputs and ids.

How do I split an IPYNB file?

Choose the notebook at the top of this page. The browser reads it, shows how many parts the current rule produces, and lists every file with its own download button. Adjust the rule — headings or a fixed cell count — and the list updates instantly. Nothing is uploaded and no install is needed.

Can I split a notebook by heading?

Yes, and that is the default. Every markdown cell whose first line is a level-1 heading (# Chapter 2) starts a new file, and the heading cell itself travels into that file. Set the selector to level 1–2 or 1–3 to also start files at ## and ### sections.

What happens to cells before the first heading?

They become notes-01-intro.ipynb when they contain anything — a title, imports, setup prose. If the notebook opens straight into a heading, there is no intro file and the first chapter takes number 01.

What if my notebook has no headings at all?

Switch the rule to “every N cells”. The splitter cuts the cell list into consecutive groups of that size, in order, and numbers them notes-01.ipynb, notes-02.ipynb, and so on. A cell is never divided between two files.

Are outputs kept in the split files?

Yes. Stream text, tables, plots, JSON and tracebacks stay under their cells with their execution counts, because the cells move as they are. The only field rewritten is the cell id, which is re-derived so ids stay unique inside each new notebook.

How are the split files named?

From the original file name, a two-digit number and the heading: analysis.ipynb with a “3. Cleaning data” heading becomes analysis-03-3-cleaning-data.ipynb. Headings in scripts that have no Latin letters keep the number only, and the original notebook’s kernel is carried into every part.

Why does my browser ask about multiple downloads?

“Download all” saves several files in a row, which browsers treat as one request. Chrome and Edge ask once for permission to download multiple files — allow it and all parts are saved. You can also download each part individually from the list.

Can I put the parts back together?

Yes — the merge tool on this site concatenates them in the order you list, with the same writer, so a split and a merge round-trip without losing cells or outputs.

Does splitting re-run the notebook?

No. Nothing is executed: the cells are copied into new documents with their existing outputs and execution counts. That also means a stale output stays stale after the split — the tool divides the file, it does not refresh it.

Is my notebook uploaded?

No. The file is read with the browser File API and the parts are written inside the tab. You can disconnect from the network after the page loads and the split still works.

Give every chapter its own notebook.

Split the monolith once, then review, run or hand off each part on its own.

Split a notebook