What you can do here
- Run Python 3 with data-science libraries: pandas, NumPy, scikit-learn, SciPy, statsmodels, Matplotlib and seaborn load automatically when you import them.
- Use real data in one click: eight sample datasets (an online shop, clinic appointments, house prices, website visits, iris), or upload your own CSV, Excel or JSON file.
- See every variable: the Variables tab lists what your code created, with DataFrame previews, array shapes and model types.
- Understand errors: each error shows the line, what it means in plain English, how to fix it, and "did you mean" suggestions for typos.
- Work like a notebook: split code into cells with
# %%, run one cell with Shift + Enter, and export it as a Jupyter notebook for Google Colab. - Share and embed: a link holds your code itself (nothing is stored on a server), and the embed code puts a runnable example on your own blog.
- input() works: type the answers in the Program input box before you run.
How it works
Python runs inside your browser using Pyodide, a version of CPython compiled to WebAssembly. The first run downloads it (about 10 MB, more for scikit-learn) and your browser keeps it for next time. Your code and files stay on your device. It runs in a background worker, so even an endless loop can be stopped without freezing the page.
Limits
PyTorch, TensorFlow and other packages with compiled code that is not built for the browser are not available, and code cannot reach the internet. For deep learning, export your work as a notebook and open it in Google Colab. Pure-Python packages can be added with import micropip; await micropip.install("package-name").
Examples
| Example | What it shows |
|---|---|
| Hello, Python | Variables, an f-string, a loop and a function. |
| Reading input() | input() reads the lines in the Program input box below the code. |
| Average order value by country | Join three tables with pandas and group by country. |
| Join orders to customers | merge() is pandas for SQL JOIN. |
| Top 5 products by revenue | Group, sum and sort. |
| Finding and handling missing values | Count, fill and drop missing values. |
| Monthly revenue chart | A bar chart with Matplotlib. |
| Predict house prices | Linear regression with scikit-learn and a train/test split. |
| Will the patient show up? | A classifier with scikit-learn, scored with ROC-AUC. |
| Cluster flowers with k-means | Unsupervised learning on the iris data, with a scatter plot. |
| Running total per customer | Cumulative sums within groups (SQL window functions, pandas style). |
| Notebook mode: cells | Lines starting with # %% split the code into cells. Click inside a cell and press Shift+Enter to run just that cell. |
| NumPy arrays and broadcasting | Vectorised maths without loops. |
Learn more
New to Python? The free Python course starts from zero, with exercises that check your answers. Look up any function in the Python reference, or open one of the 60+ example programs. Every code example on the site has an "Open in playground" button.
Questions
Is this online Python compiler free?
Yes. There is no sign-up and no limit. It runs in your own browser, so there is no server cost to pass on.
Which Python version is it?
Python 3.12, through Pyodide 0.27, with the scientific stack built for the browser.
Can I use pandas and scikit-learn online?
Yes. Import them as usual; they load automatically the first time.
Why is the first run slow?
The first run downloads Python itself. After that your browser keeps it, so runs start quickly.
Is my code private?
Yes. It runs on your device and is not uploaded. Only if you press Share is it put into a link that you choose to give out.