How to Convert IPYNB to PY
3 Ways to Convert Jupyter Notebook to Python
Here are three methods to turn your .ipynb
file into a
.py
script.
1. IPYNB to PY Converter Online (Beginner-Friendly)
The easiest way to turn a Jupyter Notebook into a Python script is by
using an online converter. You simply upload your
.ipynb
file, press Convert, and download the
result as a clean .py
file. It’s quick, free, and works
directly in your browser without any installation – perfect if you
just want to convert an IPYNB to PY for the first time.

👉 Ready to try it yourself? Use our free IPYNB to PY Converter and turn your Jupyter Notebook into a clean Python script in just one click.
2. Convert in Jupyter Notebook (Built-in Export)
If you already work in Jupyter, you can
convert a Jupyter Notebook to Python with the
built-in export. This is a quick way to turn an
.ipynb
into a clean .py
script.
-
Open your
.ipynb
in Jupyter Notebook or JupyterLab. - Go to File → Save and Export Notebook As… → Python (.py) (sometimes shown as Executable Script).
-
Download or save the exported
.py
file to your project.

Tip: Don’t see the export option? Update Jupyter/nbconvert or use the terminal method below.
3. Convert IPYNB to PY with Terminal (nbconvert)
You can export a notebook to a .py
file from the command
line. The tool is called nbconvert
and it comes with
Jupyter.
jupyter nbconvert --to python notebook.ipynb
This creates notebook.py
in the same folder. It’s a quick
way to turn a Jupyter Notebook to Python using the
terminal.
Learn more about nbconvert
-
If the command is not found, install Jupyter:
python -m pip install jupyter
-
You can also run:
python -m jupyter nbconvert --to python notebook.ipynb
Convert IPYNB to PY in VS Code
In VS Code you can export a Jupyter Notebook to a Python script once the required extensions are installed.
- Install the Python extension (Microsoft).
- Install the Jupyter extension (Microsoft).
- Open your
.ipynb
file in VS Code. - Click the three dots in the toolbar → Export → Python File.
- Save the generated
.py
file.
The notebook cells are written to a single .py
file that
you can run or edit like any other Python script.

Convert IPYNB to PY in PyCharm
PyCharm Professional has built-in support for Jupyter Notebooks. You
can open an .ipynb
file directly in the editor and export
it to Python:
- Right-click the notebook file in the project view.
- Select Save As or Export → Python File.
- Save the generated
.py
script.
In the Community Edition, Jupyter support is not included. To convert
notebooks there, use the terminal command nbconvert
or an
online converter.
Convert IPYNB to PY in Databricks
In Databricks, notebooks are stored inside the workspace, not as plain
.ipynb
files. To download a notebook as a Python script:
- Open the notebook in your Databricks workspace.
- In the top menu, click File → Export.
- Select Source File or Python (.py).
-
A
.py
file will be downloaded to your computer with all notebook code cells.
This option is useful if you want to version-control your notebooks as scripts or run them outside Databricks in any standard Python environment.