Ipynb to Markdown
Jupyter notebooks to Markdown — your saved experiments, as text
- markdown
If you do any machine learning work, half your knowledge lives in Jupyter notebooks - and notebooks are terrible to skim and worse to feed to an LLM. Ipynb2Markdown converts a .ipynb file into a Markdown string: code cells, markdown cells, and outputs, laid out as readable text. It's one of the more unusual converters in the ComfyUI-MarkItDown pack, and exactly the right tool when "remember what that experiment did" means searching your own history.
How it works
This node follows the pack's house pattern: a subclass of the generic MarkItDown node with a strict extension whitelist (.ipynb, nothing else). Since a notebook is a JSON file, markitdown routes it through its generic text handling rather than a dedicated notebook parser - the cells and their outputs get rendered out as text content. Set your expectations accordingly: you get a faithful, readable dump of what's in the file, not a polished HTML-style render of the notebook. Code and prose both come through, which is the point.
The inputs and outputs that matter
One input: source_file, a STRING with the absolute path to your .ipynb. One output: markdown, a STRING you can wire into a text viewer or an LLM context node. No configuration, no cell filtering, no options. The full notebook becomes one string, for better and worse.
Why you'd reach for it
Two good reasons. You're building a workflow that needs your own prior work as context - converting a notebook to Markdown and feeding it to an LLM node is a clean way to say "here's what I did last time." Or you just want your notebooks greppable and searchable as plain text. Either way, this is the pack's answer to "but what about my notebooks?"
Installing it
Same pack, same one-time install:
cd ComfyUI/custom_nodes
git clone https://github.com/ciga2011/ComfyUI-MarkItDown
Restart ComfyUI, or install via Manager (search "ComfyUI MarkItDown"). Notebook handling needs no extra dependencies beyond what the pack already pulls in - no models, no GPU.
Gotchas
Mind the output size. Notebooks that contain large embedded outputs - especially base64 images from matplotlib or plots - produce huge Markdown strings, which will chew through an LLM's context window in a hurry. If your notebook has heavy outputs, clean or clear them before converting. And remember the whitelist: it's .ipynb only, so a notebook saved with a different extension gets rejected.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| source_file | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| markdown | STRING | — |