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, instant, and 100% private — your notebook never leaves the browser.

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.

Also available

Try our other free tools

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 → 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 script never leaves the device. Conversion runs entirely in your browser with WebAssembly-fast JavaScript — no upload, no tracking, no account.

How to convert Python (.py) to Jupyter Notebook (.ipynb)

  1. 01

    Upload your .py file

    Drag & drop or browse to pick the Python script you want to convert into a notebook.

  2. 02

    Tweak detection (optional)

    Toggle auto-detect cells, lift module docstring, collect imports or pretty-print — the defaults work for 99% of scripts.

  3. 03

    Download .ipynb

    Get a fully valid nbformat 4.5 Jupyter Notebook ready for Jupyter, Colab, VS Code, Kaggle and PyCharm.

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, no upload to a server, and no usage limit.