现已上市.py

IPYNB Python

将代码单元导出到单个 .py 文件。 Markdown 变成评论;你保留一个可运行的脚本用于评论或 CI。

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

它是如何运作的

从上传到下载三步

1

放下你的笔记本

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

2

选择导出

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

3

下载并发货

立即获取完成的文件。在本地打开它,将其附加到电子邮件中,或上传到您的 LMS。

也可提供

尝试我们的其他免费工具

IPYNB to Python: turn a Jupyter notebook into a plain .py script in your browser

A Jupyter notebook (.ipynb) is JSON under the hood: cells, metadata, and outputs bundled together. When you need a single Python file instead—something you can drop into a repo, run with `python script.py`, or hand to someone who does not use notebooks—this ipynb to python converter online does the job right here. Upload the notebook, flip a few switches for markdown and outputs, and download a `.py` file. Nothing is uploaded to a server; the file stays on your machine.

People find this page with many phrasings: ipynb to python script, ipynb to py, convert ipynb to python file, or save ipynb as python without digging through menus in JupyterLab or VS Code. Maybe you are on a borrowed laptop, maybe your local `jupyter nbconvert` install is broken, or maybe you just want the fastest path from notebook to script. Same idea: bring the `.ipynb`, leave with runnable ipynb to python code.

The export follows a familiar pattern: code cells become real Python, markdown cells turn into `#` comment lines so you still see the narrative, and you can optionally paste cell outputs under `# Output:` comments when that helps debugging or grading. Cell boundaries use `# %%` markers so editors like VS Code still understand sections—handy if you later round-trip with a py to ipynb converter online free workflow on our Python → Notebook tool.

If you were searching for convert ipynb into pdf, convert ipynb to txt, or download ipynb examples: PDF lives on our IPYNB → PDF page; plain text is often just saving the `.py` or copying raw JSON from our JSON tool; and you never need an account here—just the browser tab.

Why use this ipynb to python converter

One .py from the whole notebook

Code cells are stitched into a single script with clear separators. You get something you can run, lint, or ship—without carrying the notebook JSON around.

Markdown stays in the file

Toggle “include markdown as comments” so headings and prose sit above the code as `#` lines. Readers still see the story the notebook told.

VS Code–friendly cell markers

Optional `# %%` lines mark cell boundaries—similar to Jupytext percent format—so tools that split on markers keep working after you leave Jupyter.

Outputs when you need them

Turn on “include outputs as comments” to freeze prints and streams under each cell. Leave it off for a slim script meant for production.

Private in the browser

Parsing runs locally. That matters when the notebook has grades, credentials, or unpublished results—you are not sending it through a random upload box.

No Python install required here

You still need Python somewhere if you want to execute the exported file—but you do not need nbconvert or Jupyter installed on this computer just to produce the `.py`.

How to convert ipynb to python in your browser

  1. 01

    Upload your .ipynb

    Drag the notebook in or browse. This is the same file you would open in JupyterLab, VS Code, Colab, or Kaggle after downloading.

  2. 02

    Choose export options

    Include markdown as comments, add outputs as comments, and keep separator lines—match how you want the ipynb to python file to read.

  3. 03

    Download the .py

    Save the script, run it with your interpreter, or open it in any editor. Rename it if your course or CI expects a specific filename.

Frequently asked questions

Open this page, upload your `.ipynb`, set the options you want, and download a `.py` file. There is no charge, no signup, and the conversion runs in your browser—your notebook is not stored on our servers.