Python (.py) zu Jupyter Notebook (.ipynb) online
Need a real .ipynb from a .py file? This py to ipynb converter rebuilds a valid Jupyter notebook so you can open the script in JupyterLab, VS Code, Colab, or Kaggle with proper cells—not a renamed text file. Upload once, keep cell detection on, download. That is convert py to ipynb / convert python to ipynb without installing Jupytext first, and without pasting functions into empty cells by hand after a teammate edited everything in a plain editor.
People search .py to .ipynb, py to ipynb, python to ipynb, or py to ipynb converter when they want notebook structure back. The tool recognizes # %% / VS Code percent markers, # %% [markdown], classic IPython # In[N]: lines (often from jupyter nbconvert --to script), and Spyder cells. No markers? It still splits on top-level def, class, and if __name__ boundaries so you are not stuck with one giant cell. Optional docstring lift and import hoisting keep the opening of the notebook tidy for teaching and reviews.
Comparing py vs ipynb or .py vs .ipynb? Scripts are flat source you run with a normal interpreter; notebooks keep cells, optional outputs, and kernel metadata for interactive work. Round-trip freely: convert ipynb to py on our IPYNB to PY page (keep # %% if you want boundaries), edit the script anywhere, then convert py to ipynb here. That pairing covers both converter directions without guessing which URL to open or renaming extensions and hoping Jupyter forgives you.
What is nbconvert in this story? Jupyter nbconvert usually goes notebook to script. This page is the reverse online path—python to ipynb—when you already have a .py and need cells again. Secure server conversion — processed briefly, not stored afterward. The converter does not execute code; run cells later in a trusted kernel. Not for PDF-to-notebook and not for printing a script as PDF (use Python to PDF). If the script came from Spyder or VS Code with percent cells, leave auto-detect on so markdown and code sections land in separate notebook cells instead of one block.

