Python Playground
Write a short Python 3.14 program, add any input in the stdin box and press Run to see its output or traceback. Load an example to try functions, classes, JSON or standard input, then download your code as main.py. Programs run in this browser with no account; each run starts a fresh interpreter and stops after two seconds of execution.
Press Run, or Ctrl+Enter in the editor. The first run downloads the 13.5 MB Python runtime from this site and checks it against pinned SHA-256 hashes.
Ctrl+Enter (Cmd+Enter on a Mac) runs. In the editor Tab indents and Shift+Tab outdents; press Esc, then Tab, to move on from the editor. main.py and stdin each hold up to 65,536 bytes. Edits are remembered in this browser when storage is available. Reset restores the starter program and its sample stdin.
Examples
Each one loads into the editor with its stdin, and the result beside it is what running it gives.
- 285 ada 9
- ink 14.00 pen 5.00 pad 3.50 sum 22.50
- count 6 total 108 largest 42
- the 4 cat 2 saw 2
- Thursday 01 January 2026 2026-04-11 358 days to 25 December
- ZeroDivisionError: division by zero
- stopped at 2 s, your code kept
- MemoryError
- stopped at 64 KiB of output
What this Python can and cannot do
The language is full Python 3.14.2, and most of the standard library imports: json, re, math, datetime, collections, dataclasses, sqlite3, hashlib, csv, zipfile and unittest among them. These are the edges.
- Only the bundled standard library imports. numpy, requests and micropip are not installed, and nothing can be installed.
- urllib, sockets and pyodide.http all fail, for outside addresses and localhost alike.
- subprocess raises OSError, os.system returns -1 and a thread cannot start.
- tkinter, turtle, curses, readline, dbm, venv and ensurepip are not in this build, nor are the Unix-only pwd, grp, resource and syslog.
- zoneinfo imports but has no time zone database, so ZoneInfo("Europe/London") fails. UTC and fixed offsets such as +05:30 work.
- open() works on a virtual filesystem that starts fresh every run. Your code is saved there as main.py in /home/pyodide, and your computer's files are out of reach.
- Reads the stdin box one line per call, and raises EOFError when the box runs out.
- Runs in browsers with WebAssembly stack switching. Elsewhere it raises RuntimeError and the console says why.
Runtime, source and licences
This playground runs Pyodide 314.0.7 (MPL-2.0) and CPython 3.14.2 (PSF licence), built with libffi, hiwire, zstd, liblzma from XZ Utils, SQLite, zlib, bzip2 and Emscripten with its musl and LLVM runtime pieces. The WebAssembly file differs from the Pyodide release in one place: bound-pyodide-memory.mjs lowers its declared memory maximum to 128 MiB, and the manifest records both hashes. Every file is served from this site: the 13.5 MB runtime downloads on your first run, and the source archives, notices and recipe (76.9 MB in all) only when you follow their links.
| File | What it is | Size | Licence | SHA-256 |
|---|---|---|---|---|
| pyodide.mjs | Pyodide loader module (runtime) | 17.9 kB | MPL-2.0 with bundled component notices | 6f1d60f7bf529beb300f0f47983c921d3982363640ba20af0e38efdddbc66109 |
| pyodide.asm.mjs | Emscripten glue for the CPython build (runtime) | 1.3 MB | MPL-2.0 with bundled component notices | f7cdc8ece80678ceb712f8e65ebe6d3a83203a180c399865f49612a051693635 |
| python_stdlib.zip | Python 3.14.2 standard library as Pyodide bundles it (runtime) | 2.5 MB | MPL-2.0 with bundled component notices | fa1957e5777068fc4f7437f96d860ae2fbe9c19732ba06c84e004ec16dd7dd7a |
| pyodide-lock.json | Pyodide lock file, read at startup; no package is installed (runtime) | 119.1 kB | MPL-2.0 with bundled component notices | 5dc2fc119108bc148c7457dc86e7675b5c87e1cafd420b9c34c1eaef7b36c010 |
| pyodide.asm.wasm | CPython 3.14.2 compiled to WebAssembly, memory maximum narrowed to 128 MiB (runtime) | 9.6 MB | MPL-2.0 with bundled component notices | 6b79a296bbbef8caa85731d6b5662451e824207ae606d7bc45d42af9aa55f629 |
| pyodide-source.tar.gz | Pyodide source at commit b1e4fcc | 1.5 MB | MPL-2.0 | a9c7ac66311ed7e0805b9970054ee5be4f69d02204d28bffe4b017310a24bad9 |
| pyodide-NOTICES.txt | Collected licence notices for Pyodide and every bundled project | 359.4 kB | Bundled source license notices | 6ac1a3c0f8178d871f93abe6a431f360795f24e28a83531d68bff2262df667f4 |
| bound-pyodide-memory.mjs | The recipe that narrows the WASM memory maximum to 128 MiB | 1.6 kB | MPL-2.0 modification recipe | b58debdc825634bc20ec8e66c3ab089f1467135bb47d329cc4e1fe66c9d3252e |
| pyodide-memory-manifest.json | SHA-256 of the original and the narrowed WASM, and the page counts | 618 B | Factual provenance | b551c3ae626381232600c905f4f0876f4c415edce0a601db581e484b6bfb3685 |
| source-cpython.tgz | CPython 3.14.2 source | 30.6 MB | PSF and Python licences, original per-file licences | c609e078adab90e2c6bacb6afafacd5eaf60cd94cf670f1e159565725fcd448d |
| source-libffi.tar.gz | libffi source | 595.1 kB | MIT | 0c4e5647b79e21b900eb872dd98a3e0a66be12b36ad89677f61fd901a2615778 |
| source-hiwire.tar.gz | hiwire source | 27.3 kB | MIT | 0d64144f149c0de3bd157551421833c6c16fdc0492c312a6325ffc25d185c93c |
| source-zstd.tar.gz | zstd 1.5.7 source | 2.4 MB | BSD or GPL dual licence, used under BSD | f24b52470d12f466e9fa4fcc94e6c530625ada51d7b36de7fdc6ed7e6f499c8e |
| source-xz.tar.gz | XZ Utils 5.2.2 source, complete | 1.5 MB | liblzma public domain; the XZ build tools carry GPL and LGPL terms and are not linked into the runtime | 73df4d5d34f0468bd57d09f2d8af363e95ed6cc3a4a86129d2f2c366259902a2 |
| source-sqlite3.tar.gz | SQLite 3.39.0 source | 3.1 MB | Public domain | e90bcaef6dd5813fcdee4e867f6b65f3c9bfd0aec0f1017f9f3bbce1e4ed09e2 |
| source-emscripten.tar.gz | Emscripten 5.0.3 source | 34.5 MB | MIT and NCSA, with bundled musl and LLVM notices | b32ce4192bae12f15b06b1eec67b7ea6ac8ae809fc81230a43354c3c24251360 |
| source-zlib.tar.gz | zlib 1.3.1 source | 1.6 MB | zlib licence | 17e88863f3600672ab49182f217281b6fc4d3c762bde361935e436a95214d05c |
| source-bzip2.zip | bzip2 1.0.6 source | 806.6 kB | bzip2 licence, BSD-style | 9628e7bc598719335ce1d1219c1a4fc241652c0a7b4d993fa82a9b98a6c5dec6 |
Common questions
- Does this online Python compiler support input()?
- Yes. Type the program's input into the stdin box before you press Run. Each input() call reads the next line, sys.stdin reads all of it, and when the lines run out input() raises EOFError, which the console explains. The stdin box holds up to 65,536 bytes, the same limit as the editor.
- Can I install packages like numpy or requests with pip?
- No. This playground runs the Python standard library only: there is no pip, and numpy, requests and micropip are not installed. Most of the standard library imports, including json, re, math, datetime, collections, dataclasses, sqlite3, hashlib and csv, and the page lists the modules and features that are missing.
- Which version of Python does it run?
- Python 3.14.2, through Pyodide 314.0.7, which is CPython compiled to WebAssembly. The version is pinned: the page loads the same files every time, checks each one against its SHA-256 before anything runs, and sys.version reports 3.14.2.
- What happens if my program has an infinite loop?
- It is stopped two seconds after it starts running, and the console says so. Every run has its own worker inside a sandboxed frame, and at the deadline the frame is removed, which ends the worker however busy it is. Your code stays in the editor. The Stop button ends a run sooner, and a run is also stopped once it has printed 64 KiB of output.
- Is my code sent to a server?
- No. Your code runs in your browser and is never uploaded. The only files this tool downloads are the Python runtime's own, from this site, on your first run. Your code and stdin are kept in this browser's local storage so they are still here next time, and the Start over button forgets them.
- Can my program use the internet, files or other programs?
- Not the internet: urllib, sockets and pyodide.http all fail inside the sandbox. Files work on a virtual filesystem created fresh for every run, so a program can write a file and read it back within one run, and nothing on your computer is reachable. subprocess and os.system cannot start programs, and threads cannot start.
- How much memory can a program use?
- Python's WebAssembly memory is capped at 128 MiB. The runtime file declares that maximum, so a program that asks for more, such as bytearray(200 * 1024 * 1024), gets a MemoryError instead. The cap covers Python's WASM memory, not everything the browser tab uses.
- How can I practice Python with the examples?
- Choose Load beside an example to put both its program and matching stdin into the editor. Squares and JSON shows a function, input() and JSON parsing; A dataclass shows a class and f-strings; Every stdin line reads a list of numbers. Press Run, compare the console with the displayed result and edit the code to try another case. When it changes your draft, loading an example offers Undo for your previous code and stdin. These are short practice programs rather than a complete Python course.
- Does the editor help with indentation or correct my code?
- Tab inserts four spaces or indents selected lines, Shift+Tab outdents them, and Enter keeps indentation with an extra level after a line ending in a colon. Ctrl+Enter runs the program, or Cmd+Enter on Mac. Press Esc and then Tab to move focus out of the editor. Python reports syntax/runtime errors in the console; this editor has no autocomplete, automatic code correction, breakpoints or step debugger.
- Can I run Python regex, SQLite or small data-processing programs?
- The bundled standard library includes re, sqlite3, csv, json, collections and math, so your short Python program can use those imports. SQLite databases and files exist only in the fresh virtual filesystem for that run. This does not connect to a MySQL server, install analysis packages or import a local CSV file through a file picker; you can supply text data through stdin.
- Is the console a Python shell, REPL or Jupyter notebook?
- Run executes the whole main.py program in a fresh interpreter. Variables and virtual files from an earlier run do not survive, and the console shows output rather than accepting more commands. There are no notebook cells, persistent REPL sessions, terminal commands or multi-file projects here.
- Can I use the compiler on a phone or Android?
- Use a current mobile browser with WebAssembly and worker support on Android or iPhone. Enter code and stdin, then tap Run; no app installation or account is needed. The Python runtime downloads from this site on the first run, so that load needs a connection. Programs still have the same two second execution and 128 MiB WASM memory limits; asyncio.run additionally needs browser stack-switching support.
Python 3.14.2 runs through Pyodide 314.0.7 inside your browser, not on a hosted Linux machine, so there are no pip packages, network, subprocesses, host files or page DOM. Each run gets a fresh worker and virtual filesystem and is stopped after two seconds of running. The 128 MiB ceiling caps Python's WASM memory, not everything the browser tab uses.