Local code export
IPYNB to Python
Extract code cells in notebook order. Optionally include Markdown cells as Python comments.
Export Python source
Code cells are never executed. The generated file is created locally.
.ipynb fileYour file is processed only in this browser.
What the export includes
Each code cell is separated with a `# %%` marker, which is understood by VS Code and several notebook-oriented editors. Markdown can be retained as comments so a reader keeps the notebook's narrative context.
Saved outputs, execution counts, widgets, and notebook metadata are deliberately not written to the Python file. A `.py` file represents source code, not a replayable notebook session.
Before running the exported script
Review the generated source before execution. The original notebook may depend on packages, local files, environment variables, data paths, or an active kernel that are not included in a Python export.
Use Python to IPYNB when you need to turn an edited script back into an unexecuted notebook with `# %%` cell markers.