Python fences become cells
A ```python, ```py or ```ipython3 block opens a code cell with the block body copied exactly; Quarto {python} and MyST {code-cell} directives work the same way.
MD to IPYNB
Drop in a .md file and download a valid .ipynb notebook: prose becomes markdown cells, Python fences become code cells, and everything else — including bash and output blocks — stays in the prose. Nothing is uploaded anywhere.
Converted in your browser — the document is never uploaded. You can also drop it anywhere on this page.
That file could not be opened
notes.md
Notebook preview (first 200 lines)
The notebook is assembled in this tab from the document you chose. Nothing is uploaded, and the download is yours alone — the same file every time for the same document.
Need it the other way? Convert a notebook to Markdown0 bytes uploaded
Parsing and notebook assembly happen on your device.
nbformat 4.5 output
The current notebook format every Jupyter tool reads.
```python opens a code cell
Quarto {python} and MyST {code-cell} fences too.
100% of the prose kept
Headings, lists, tables, links and images stay markdown.
What the notebook keeps
The reader follows the same convention the site's IPYNB to Markdown export writes, so a document and its notebook stay recognisable to each other.
A ```python, ```py or ```ipython3 block opens a code cell with the block body copied exactly; Quarto {python} and MyST {code-cell} directives work the same way.
```bash, ```json, output blocks and indented code stay inside the markdown cell exactly as you wrote them — a cell has to be code the Python kernel can run.
Markdown cells pass through untouched, so GitHub tables, images, footnotes and links render in Jupyter the way they render on GitHub.
Cell options like :tags: [hide-input] are metadata in MyST, not Python, so they are lifted out of the code cell instead of breaking it.
Drop in a README with fenced examples and every Python example becomes a runnable cell, in order, with the prose around it — the fastest way from documentation to a live demo.
Cell ids come from the cell text rather than random, so the same document converts to the same file — and a diff shows content changes and nothing else.
Compatibility
CommonMark runs through as-is; these are the fence forms and edge cases the reader knows about.
Code fences recognised
Kept as prose
Notebook output
Known limits
How it works
Drop in a .md file and download a valid .ipynb notebook: prose becomes markdown cells, Python fences become code cells, and everything else — including bash and output blocks — stays in the prose. Nothing is uploaded anywhere.
Drop the document in
Choose a .md file or drag it onto the page; it is read on your device and the notebook is assembled immediately.
Check the cells
The preview shows the notebook JSON: markdown cells for the prose, code cells for the Python fences, in document order.
Download the .ipynb file
Save notes.ipynb next to your assets and open it in Jupyter, JupyterLab, Colab or VS Code — then run the cells.
Five ways to turn a Markdown document into a notebook, from the browser converter above to the tooling built into Jupytext, Pandoc and Jupyter itself — pick the one that fits where you already are.
The command-line standard: jupytext --to notebook notes.md writes notes.ipynb beside it, and --set-formats md,ipynb pairs the two files so every save updates both. It needs Python and an install — the route to choose when the Markdown already lives in a project you control.
Pandoc reads and writes Jupyter notebooks: pandoc -o notebook.ipynb notes.md turns code blocks into code cells and everything else into markdown cells. A single binary with no Python needed — at the cost of Pandoc’s own Markdown dialect.
The classic small tool for this exact job: notedown notes.md > notes.ipynb turns every fenced or indented code block into a cell. Convenient for scraping a folder of notes; nothing to install behind the converter at the top of this page.
Jupyter Notebook and JupyterLab open a notebook with File → Open or the upload button; Colab uses File → Upload notebook. That is the second half of every route on this page: the converter produces the file, Jupyter opens it.
In a hurry? Use the converter at the top.
The browser converter above reads the same Markdown as every route on this page and produces the same nbformat 4.5 notebook — with nothing installed and nothing uploaded.
FAQ
Short answers about converting a Markdown document to a Jupyter notebook — which fences become cells, what happens to images, and whether the notebook runs as-is.
Use the converter at the top of this page: choose or drop in a .md file and the browser turns it into a notebook — prose becomes markdown cells, ```python fences become code cells, and the rest stays in the prose. Then download the .ipynb file and open it in Jupyter, JupyterLab, Colab or VS Code. No upload, no install and no terminal involved.
Run jupytext --to notebook notes.md, which writes notes.ipynb beside it and can pair the two files so every save updates both. Jupytext is a Python package, so it needs an install — this page does the same job in the browser, with nothing to set up.
Fences tagged as Python: ```python, ```py, ```python3, ```ipython3, Quarto’s ```{python} and Jupytext’s ```{code-cell} python (or a bare {code-cell}). Every other language and every unlabelled fence — outputs, diagrams — stays inside the markdown cell, because a notebook cell has to be code the kernel can run.
They stay in the markdown cells exactly as written. Relative paths (images/plot.png) resolve from the folder the notebook lives in, so keep the assets next to the .ipynb — remote URLs and data: URLs work with no extra setup.
Yes, and it is the most common use: fenced Python examples in a README become runnable cells in order, with the headings and explanations around them as markdown. Blocks in other languages stay as annotations, so the notebook still reads like the README.
The code inside the cells is copied unchanged, so yes — run all cells and each block behaves the way it would in a script. There are no stored outputs to begin with, and a cell only works if its imports and variables were set up by earlier cells in the document.
Yes. In Colab use File → Upload notebook and pick the .ipynb file. Colab accepts .md files too, but opens them as text — the converted notebook is the version that gets cells, markdown and a kernel.
Jupytext is the right tool inside a project: it can pair a Markdown file and a notebook so every save writes both. This converter runs in the browser instead — nothing is installed, nothing is uploaded, and it works on any machine, which is useful when a README lands in your inbox and you want a runnable notebook out of it.
No. The file is read with the browser File API and turned into a notebook inside the tab. You can disconnect from the network after the page loads and the conversion still works — which is also the practical proof that nothing is uploaded.
Structure survives — markdown cells and the code blocks come back — but the round trip is not a restore: outputs and execution counts are gone (the Markdown never contained them), and a code block only returns as a cell if its fence was tagged with a language the reader knows. Use it to bring documentation into a notebook, not to recover a notebook whose .ipynb file is lost.
Drop it in, download the .ipynb and open it — the prose is already laid out; run the examples and the documentation becomes a live demo.
Convert Markdown to IPYNB