Write Python in the editor above, press Run, and read the output below it. Under the hood this is a real CPython 3 interpreter compiled to WebAssembly, executing on your machine — not a mock console, and not a server somewhere receiving your code. The first run downloads the interpreter (about 10 MB), and from then on it stays warm: repeated runs start instantly.
How to run Python online here
The workflow is deliberately small. Type or paste your program into the editor. Press Run, or hit Ctrl/Cmd + Enter from anywhere inside the code. Output printed with print() appears in the output panel, and anything Python writes to stderr — including full tracebacks — shows up in red with the line numbers where the error actually happened. Each run starts from a clean interpreter state, so variables, imports, and prints from your previous run never leak into the next one.
If a program runs longer than you intended (an accidental infinite loop, for instance), press Stop. Stopping discards the current interpreter — the next run builds a fresh one, which is also why a crashed program can never poison the one after it.
Reading input with input()
Most online Python runners quietly break on input(). This one doesn’t: open Program input (stdin) below the output panel and put one line per input() call. Running the Reading input example with Alex and 3 in the input box produces a real conversation:
What is your name? Alex
How many years have you coded? 3
Nice to meet you, Alex!
In another 3 years you will have coded for 6 years.
When the input box runs out of lines, further input() calls raise EOFError, exactly like piping a short file into python3 on the command line. That behavior makes it easy to practice the classic stdin-driven exercises — name-and-age prompts, menu loops, processing lists of numbers — without pretending to type into a frozen console.
Installing packages
The Packages field takes a comma-separated list. Names that ship inside the Pyodide distribution (numpy, pandas, matplotlib’s dependencies, and many more) load straight from the bundled registry; anything else that is a pure-Python wheel installs through the embedded micropip. Enter numpy, hit Run, and the first execution takes a little longer while the package downloads — after that it is cached in memory for the session.
Two honest limits: native packages that need compiled extensions outside the Pyodide build (some database drivers, for example) cannot be installed, and packages are re-fetched after a page reload because nothing is stored on a server. For everything else — practicing pandas merges, trying out itertools, testing a small class design — it behaves like the Python you know.
Your code stays on your device
The program you write is executed by your own browser and saved only in your browser’s local storage, so closing the tab and coming back later restores your last edit. The share button packs the current code (and stdin and packages) into the link itself — the URL fragment is never sent to any server, and people you share it with see exactly what you wrote. If you would rather not keep anything, Reset returns the editor to the starter example and clears the saved state. There is no account, no history on our side, and nothing to delete later.
Files, downloads, and imports
Three toolbar actions cover the round trip. Import opens a .py file from your computer straight into the editor. Download saves the current code as main.py with proper UTF-8 encoding. Copy puts the code on your clipboard for a paste into an exercise, a gist, or an email. Combined with share links, you can move a working program between machines without ever touching a file server.
Which Python is this, exactly?
The engine is Pyodide — CPython compiled to WebAssembly — and the badge in the status bar shows the exact Python and Pyodide versions after the engine loads. The language semantics are the ones you know: the same stdlib, the same exceptions, the same everything, with only the filesystem and OS-specific corners adapted to the browser sandbox. If you are following the Python curriculum, every lesson example runs here unchanged — the two were built to match.
Frequently asked questions
Can I run Python 3 here? Yes — this is Python 3, not a Python-like subset. Syntax, f-strings, dataclasses, and the standard library all behave as documented.
Is my code uploaded anywhere? No. Execution happens in your browser via WebAssembly. Code is saved locally and shared only through links you create yourself.
Does it work offline? After the interpreter has loaded, you can disconnect and keep running code. A fresh page load needs the network once to fetch the engine again.
Can I use it on a phone? Yes. The editor, input box, and output stack vertically on small screens, and the console text scales with your system font settings.
Why is the first run slower? That is the one-time interpreter download. Every run after it skips the download entirely.