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

Also searched as

  • run python in browser
  • online python interpreter no install
  • pyodide python playground
  • python webassembly online
  • run python script online
  • python numpy pandas online
  • python repl in browser
  • try python fibonacci online

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.

How can Python run in the browser?

The playground uses Pyodide, CPython compiled to WebAssembly, running in a Web Worker so the page stays responsive.

Can I use the standard library and packages?

Standard-library modules such as math and json are available, and numpy, pandas and matplotlib can be loaded from Pyodide's package set.

What output do I see?

You see print output and the value of the last expression.