Available now.ipynb

Python Jupyter Notebook

Rebuild a .ipynb from a .py script using cell markers, docstrings, and imports, ideal when someone edited your script outside Jupyter.

Free and instant. Files are processed briefly on our servers for conversion, then discarded — nothing is stored.

How it works

Three steps from upload to download

1

Drop your notebook

Drag a .ipynb onto the card or browse your files. You never create an account.

2

Choose the export

Select Word, PDF, Markdown, HTML, LaTeX, ZIP, Python tools, viewer, cleaner, merger, or splitter, whatever matches your reviewer.

3

Download and ship

Grab the finished file immediately. Open it locally, attach it to email, or upload it to your LMS.

Python (.py) to Jupyter Notebook (.ipynb) online

Bring an ordinary Python script into Jupyter format with sensible cells, markdown, and imports. Upload your.py file here and download a valid.ipynb that opens in JupyterLab, VS Code, Google Colab, PyCharm, Cursor, or Kaggle.

This py to ipynb converter is built for the exact workflow people usually mean when they search py to ipynb, py to ipynb converter, py to ipynb online, or python script to notebook: take source code that already exists as a.py file and rebuild the notebook structure without manually copying blocks into Jupyter one cell at a time.

The converter recognizes common patterns: Jupytext / VS Code percent markers (# %%), markdown cells (# %% [markdown]), classic IPython script lines (# In[1]:), and Spyder cells. If your file has no markers, it still splits intelligently so you are not stuck with one giant cell.

Like the rest of Jupy Tools, conversion stays in your browser. Your source code never gets uploaded to a backend, useful for private repos, student work, and production scripts. The output is a real nbformat notebook, not a screenshot or a renamed text file.

Why use this Python to Notebook converter

Auto-detect cell markers

Recognizes Jupytext / VS Code percent (# %%), markdown cells (# %% [markdown]), IPython script (# In[N]:) and Spyder formats out of the box.

Smart cell splitting

When no markers are present, splits sensibly on top-level def, class and if __name__ == "__main__": boundaries.

Module docstring to markdown

A leading """docstring""" becomes the first markdown cell, perfect for adding context, narrative or a title.

Imports collection

Optionally hoist every import and from … import … statement into a single first cell, deduplicated.

Customizable kernel

Defaults to python3 / Python 3.x, auto-detected from a #!/usr/bin/env python3.11 shebang when present.

100% private & in-browser

Your file is processed briefly on our servers and not stored afterward. Secure server conversion — processed briefly for this request, not stored afterward.

FAQ

Frequently asked questions

Yes. Drag a Python file in, or click to browse, and download the resulting Jupyter Notebook (.ipynb) instantly. There is no account, secure server conversion (not stored afterward), and no usage limit.

The converter auto-detects Jupytext "percent" markers (# %% for code, # %% [markdown] for markdown), the IPython script format (# In[N]: produced by jupyter nbconvert --to script) and Spyder cells. If your file has none of these, it is treated as a single cell or split intelligently on top-level functions and classes.

Yes. The output is a fully valid nbformat 4.5 notebook, open it in JupyterLab, the classic Jupyter Notebook, VS Code, Cursor, PyCharm, Google Colab, Kaggle, or any other notebook viewer.

No. The Python file is parsed and converted entirely in your browser using JavaScript. Nothing ever leaves your device.

A top-of-file """docstring""" is lifted into the first markdown cell, so your notebook opens with a real title and intro instead of a triple-quoted string. Inline comments and IPython magics (%matplotlib inline, !pip install …) are preserved as-is.

Yes. Generate a percent-format .py with our IPYNB to Python converter, edit it in any text editor, then convert it back here. Cell boundaries, markdown blocks and code structure are preserved.

Practical limits depend on file size and our free daily guest allowance.

Open this Python to Notebook page, upload your.py file, keep the default cell-detection options, and download the generated.ipynb. The notebook opens in JupyterLab, VS Code, Colab, PyCharm, Cursor, and other nbformat-compatible tools.

It creates a real Jupyter Notebook JSON file with nbformat metadata and ordered cells. It does not simply rename your script from.py to.ipynb.

Yes. VS Code and Jupytext percent-format scripts use # %% separators, and this converter turns those sections into notebook cells. # %% [markdown] blocks become markdown cells.

Yes. Download the.ipynb, then upload it to Colab or open it from Drive. Colab reads standard nbformat notebooks, so the generated file works like a normal notebook.

No. The converter parses the script and builds notebook cells; it does not execute the code. Run cells later inside Jupyter, Colab, VS Code, or another trusted environment.

Yes. Use the IPYNB to Python converter on this site when you need the reverse direction. It exports code cells back to a.py script with optional markdown comments and cell markers.