Python Playground

Python Playground

Run real Python in your browser via Pyodide (CPython compiled to WebAssembly), executing inside a Web Worker so the page stays responsive. Write code, see stdout and the last expression's value, and use standard-library modules like math and json.

Pre-load packages:

Click Run to load Python (Pyodide) and execute your code.

~10-20 MB download on first use — runs in a Web Worker so the page stays responsive, and stays loaded for subsequent runs.

Runs real CPython, compiled to WebAssembly via Pyodide, in a Web Worker so a long-running script never freezes the page. The last expression's value is shown as a result (like a REPL); use print() for explicit output. The runtime is fetched from Pyodide's CDN on first run and kept warm for subsequent runs in the same session — click Restart to reload it from scratch. Check numpy/pandas/matplotlib above to fetch those pre-built packages from Pyodide's package CDN before your code runs (also a one-time download, kept warm); a plot left open by matplotlib.pyplot is rendered below the console automatically.

Python Playground

Run real Python in your browser via Pyodide (CPython compiled to WebAssembly), executing inside a Web Worker so the page stays responsive. Write code, see stdout and the last expression's value, and use standard-library modules like math and json.

Common uses

  • Run a Python script in the browser
  • Try a Fibonacci function in Python
  • Use Python's math and json standard library modules

Frequently asked questions

Is my data uploaded to a server?

No — your code runs entirely in your browser, inside a Web Worker. Pyodide (the CPython-to-WebAssembly runtime, ~10-20 MB) is fetched from its CDN on first run and cached for the session, but your code and its output are never sent anywhere.