现已上市.ipynb

Python Jupyter 笔记本

使用单元格标记、文档字符串和导入从 .py 脚本重建 .ipynb - 当有人在 Jupyter 之外编辑您的脚本时非常理想。

免费、即时且 100% 私密 — 您的笔记本永远不会离开浏览器。

它是如何运作的

从上传到下载三步

1

放下你的笔记本

将 .ipynb 拖到卡上或浏览您的文件。您永远不会创建帐户。

2

选择导出

选择 Word、PDF、Markdown、HTML、LaTeX、ZIP、Python 工具、查看器、清理器、合并器或拆分器 - 任何与您的审阅者匹配的工具。

3

下载并发货

立即获取完成的文件。在本地打开它,将其附加到电子邮件中,或上传到您的 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, or Kaggle.

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.

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.