ipynb to pdf

IPYNB to JSON

Notebook to JSON,structured and scriptable.

Drop in an .ipynb file and download a normalised .json document: one canonical cell shape, a summary at the top, outputs as plain data and base64 images optionally stripped — ready for jq, scripts and pipelines.

Converted 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

1 canonical shape

Every cell normalised to the same fields, whatever wrote the notebook.

0 bytes uploaded

Parsing and serialization happen on your device.

jq ready

A real JSON document — valid, pretty-printed, no cleanup.

6 notebook sources

Jupyter, JupyterLab, Colab, VS Code, Kaggle, Deepnote.

What the file keeps

A notebook a script can read without knowing nbformat.

The converter parses the notebook format and writes one canonical document — every consumer reads the same keys, whatever saved the file.

One canonical shape

Cells come out with the same keys everywhere: cell_type, source as a single string, execution_count and outputs. nbformat 3 worksheets and nbformat 4 notebooks land in the same structure.

A summary at the top

total_cells, counts per type, outputs, cells_with_image_outputs and code_lines — so a script can answer what a notebook contains without walking the cells array.

Outputs as plain data

Stream text, results and tracebacks stay structured, and ANSI escape codes are stripped — the JSON is clean to diff, search and compare.

Images optional

Base64 payloads dwarf everything else a notebook stores. Strip them and their mime types are listed under stripped_mimes instead of vanishing silently.

Deterministic output

The same notebook always serialises to the same document: two-space indentation, fixed key order, one trailing newline — safe to commit and diff.

Pipeline-friendly

Feed the file to jq, a Python script or a CI check. It is one JSON document that JSON.parse accepts: no comments, no trailing commas, no surprises.

Compatibility

Reads every notebook you can throw at it.

Notebooks from Jupyter Notebook, JupyterLab, Google Colab, Kaggle, Deepnote and VS Code all convert, including the older nbformat 3 files.

Notebook formats

  • nbformat 4 (current)
  • nbformat 3 worksheets (legacy)
  • source normalised to one string
  • metadata kept when opted in

Cell types

  • code — outputs and execution_count
  • markdown — attachments as data URLs
  • raw cells passed through
  • empty cells kept, flagged by the summary

Output types

  • stream text verbatim
  • execute_result data bundles
  • tracebacks with ANSI stripped
  • base64 payloads listed when stripped

Known limits

  • not a converter back to .ipynb
  • widget state is not interpreted
  • HTML outputs kept as source strings
  • images stay base64 or are dropped

How it works

Three steps to the file.

Drop in an .ipynb file and download a normalised .json document: one canonical cell shape, a summary at the top, outputs as plain data and base64 images optionally stripped — ready for jq, scripts and pipelines.

  1. 01

    Drop the notebook in

    Choose an .ipynb file or drag it onto the page; it is parsed on your device and serialized immediately.

  2. 02

    Check the document

    The preview shows the start of the JSON — the summary first, then the cells array in notebook order.

  3. 03

    Download the .json file

    Save notebook.json and open it with jq, an editor or a script; the document is valid JSON with no cleanup needed.

Every route from notebook to JSON

From the browser converter above to jq and the command line — pick the route that fits where you already are.

jupyter nbconvert — the command line

jupyter nbconvert --to json notebook.ipynb writes the raw notebook back out under a .json name: same structure, same base64 payloads, no normalisation and no summary. This page normalises and summarises, in the browser, with no install.

Jupyter's own menus

JupyterLab and classic Notebook offer File → Download As → Notebook (.ipynb) — JSON, but unnormalised and still carrying every base64 figure. This converter writes the clean version.

jq, scripts and CI

jq '.summary' notebook.json prints the cell counts and language without walking the cells array — the summary exists so scripts and pipelines can read a notebook without understanding nbformat at all.

In a hurry? Use the converter at the top.

The browser converter above reads the same notebooks as every route on this page and produces the same normalised .json document — with nothing installed and nothing uploaded.

What the file keeps (and what it drops)

  • Cell order and content — nothing is reordered or rewritten.
  • Outputs as structured data — stream text, results, tracebacks.
  • ANSI stripped — escape codes removed from every text field.
  • A summary object — counts and language for scripts to read first.
  • Base64 images optional — kept, or stripped and listed by mime type.
  • One canonical cell shape — the same keys whatever wrote the notebook.

FAQ

IPYNB to JSON: frequently asked questions

Short answers about turning a notebook into JSON — why normalise a file that already is JSON, what the summary carries, and how to read the result with jq.

How do I convert IPYNB to JSON?

Use the converter at the top of this page: choose or drop in your .ipynb file and the browser writes a normalised JSON document — summary first, then every cell in notebook order. Download the .json file. No upload, no install, no terminal.

An .ipynb file is already JSON — why convert it?

Because the raw file is not a document you can rely on. Cell sources are sometimes strings, sometimes arrays of lines; outputs mix mime bundles with base64 payloads; metadata differs between tools. This converter pins one shape for all of it and adds a summary, so a script written once keeps working.

How do I read a notebook with jq?

With jq '.summary' notebook.json you get the cell counts, language and output totals in one line; jq '.cells[] | select(.cell_type=="code")' walks only the code. The summary object exists exactly so these one-liners do not need to understand nbformat.

What is in the summary object?

total_cells, code_cells, markdown_cells, raw_cells, outputs, cells_with_image_outputs and code_lines — plus the language, kernel and nbformat at the top level of the document. Everything needed to decide whether a notebook is worth parsing further.

Can I strip the images to shrink the file?

Yes. Base64 plots and figures are usually 90% of a notebook's bytes. With image stripping on, each payload is replaced by its mime type listed in stripped_mimes, so you can see exactly what was left out instead of losing it silently.

Does the JSON keep execution counts and outputs?

Yes — outputs and execution_count are kept per code cell by default. Stream text, results and tracebacks all carry over, with ANSI colours removed so the text is clean inside a JSON string.

How do I export notebook JSON from the command line?

Run jupyter nbconvert --to json notebook.ipynb. It writes the notebook back out as-is: the same structure, the same base64 payloads, no normalisation and no summary. Use it when you need the untouched file; use this page when you need a clean document.

What happens to markdown cell attachments?

Images attached to markdown cells are rewritten as data URLs in the JSON, so the document stays self-contained — one file with no sidecar images — and a renderer reading the JSON can still resolve them.

Is the JSON stable enough to commit to git?

Yes. The same notebook serialises to the same bytes in a fixed key order, so diffs show real changes only. Combined with stripped images, it is the compact, diffable form of a notebook for repository review.

Does the conversion work offline?

Yes. The file is read with the browser File API and serialized inside the tab, so after the page loads you can disconnect the network and the conversion still works — which is also the practical proof that nothing was uploaded.

Is my notebook uploaded when I convert it here?

No. The file is parsed as JSON and re-serialized inside the tab. No server is involved at any step, and closing the tab leaves nothing behind.

Is the IPYNB to JSON conversion free?

Yes, with no account, no file-size gate and no watermark. The conversion runs on your own device, so there is no per-file cost — same as the site's IPYNB to PDF, PY, HTML, Markdown, LaTeX and DOCX converters.

A notebook is data. Treat it like data.

Drop it in, download the .json, and let a script answer questions about the session instead of reading it by hand.

Convert a notebook to JSON