Run Python in your browser: an offline playground with NumPy, pandas and Matplotlib
Want to test a Python idea without installing anything? The Python Playground runs real Python 3.12 inside your browser tab. Your code is never sent to a server.
How it works
The playground uses Pyodide, a full CPython build compiled to WebAssembly. It runs in a background worker, so a long loop never freezes the page.
- The first visit downloads about 10 MB. After that the browser keeps a copy, so later visits start fast and mostly work offline.
- Output from print() shows up line by line, and errors show the normal Python traceback.
- Your code is saved in this browser automatically.
Libraries you can use
- Data: NumPy, pandas and SciPy for arrays, tables and statistics.
- Charts: Matplotlib. Charts appear right below the output.
- Machine learning basics: scikit-learn for regression, classification and clustering.
- Standard library: json, re, datetime, collections, itertools, math, random, csv and more.
Installing other packages
Type a package name in the pip install box, or install from your code:
import micropip
await micropip.install("faker")Pure-Python packages from PyPI usually work. Packages that need native drivers, a GPU or OS-level access, such as PyTorch, TensorFlow or tkinter, cannot run in a browser.
Good things to try
- Paste a small CSV, load it with pandas and print df.describe().
- Plot a sine wave with NumPy and Matplotlib.
- Practise lists, dictionaries and functions while you follow the free Python course.
- Prepare data here, then query it in the SQL Playground or tidy it in the CSV Viewer & Editor.
Why run Python in the browser
- No install, virtual environment or account.
- Works on any computer with a modern browser, including school and office machines.
- Private by design: data and code stay on your device.
Writing JavaScript instead? Use the JS/TS Playground for the same quick, private workflow.