现已上市.ipynb

Python Jupyter 笔记本

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

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

它是如何运作的

从上传到下载三步

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 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.