Online Python Compiler

Write and run Python 3 in your browser. Free, no install, no sign-up. pandas, NumPy, Matplotlib and scikit-learn are ready to import.

Open full editor
Loading...

Click Run to see output

Or press Ctrl + Enter

The full editor adds sessions that save automatically, input(), your own files (CSV, Excel, JSON, SQLite), sharing links and .py export.

Python examples

All examples

Each example has code you can run and edit on the page, plus an explanation of how it works.

Compilers for data science libraries

About this compiler

How this online Python compiler works

PythonHere runs Python 3.13 right in your browser. It's the real CPython interpreter, compiled to WebAssembly by the Pyodide project, so your code behaves the way it would on your own machine. The first visit has to download Python, which takes a moment. After that your browser keeps a copy, and the editor is ready in a few seconds.

Your code runs on your computer, not on ours. Sessions are saved in your browser, and nothing you write is sent to us unless you click Share to make a link.

What you can do

  • Import pandas, NumPy, Matplotlib, scikit-learn, SciPy, SymPy and more; they load on first import.
  • Install pure-Python packages from PyPI just by importing them.
  • See Matplotlib charts right in the output panel.
  • Read and write your own files by name: pd.read_csv("data.csv").
  • Keep several sessions; each one saves as you type.

Limitations

  • Packages that need native code not built for WebAssembly (PyTorch, TensorFlow) can't be installed.
  • No raw network sockets; most web requests from Python are blocked by the browser.
  • Heavy computations run slower than on a native Python install.
  • input() needs the full editor, and isn't supported in Safari yet.

Keyboard shortcuts

Ctrl + EnterRun code (Stop while it runs)
Ctrl + KCommand palette
Ctrl + Z / Ctrl + Shift + ZUndo / redo
Ctrl + SpaceShow suggestions

On a Mac, use ⌘ instead of Ctrl.

Frequently asked questions

Yes. There is no account, no install and no usage limit. Open the page and start writing Python.
Python 3.13, compiled to WebAssembly by the Pyodide project. It is standard CPython, so the language and the standard library behave as they do on your computer.
pandas, NumPy, Matplotlib, scikit-learn, SciPy, SymPy and many other packages load automatically the first time you import them. Pure-Python packages from PyPI are installed automatically too. Packages that need native code not built for WebAssembly, such as PyTorch or TensorFlow, are not available.
No. Your code runs inside your browser. Nothing is sent to a server unless you click Share to create a link.
Yes, in the full editor. When your program calls input(), a prompt appears in the output panel. This works in Chrome, Edge and Firefox; Safari does not support it yet.
Yes. In the full editor, attach a file (CSV, Excel, JSON, SQLite, text, images…) or drop it onto the editor, then read it by name, for example pd.read_csv("data.csv"). Files Python writes appear next to your attached files. Files stay in your browser storage and are never uploaded.
Yes. Every session is saved automatically in this browser, so it is still there when you come back. Clearing your browser data removes it; use Export to download a .py file you can keep.
Click Share to get a link. Anyone who opens it sees your code in the editor and can run it, without an account. Attached files are not included in shared links.