Python Playground
Write or paste Python code and run it right here. The code runs in your browser tab, not on a server. No account and nothing to install.
How it works
- Type or paste code into the editor.
- Press Run or Ctrl+Enter. Output appears as the program prints it.
- Press Stop at any moment. It halts even an infinite loop.
A Python sandbox in your browser tab
It is a Python 3 sandbox: the interpreter is CPython 3.14 compiled to WebAssembly (Pyodide). It is downloaded once and then runs inside the page. Your code is not uploaded anywhere: this site has no server that receives it.
As a Python coding sandbox it keeps mistakes inside the tab: the program cannot read files on your computer and cannot open network connections. Try code from a lesson or a forum answer in this online Python sandbox before you run it on your own machine. It is a Python code sandbox, not a remote server.
Features of the Python Playground
Everything this online Python playground includes:
- Python in the browser: Python 3.14 and its standard library.
- numpy and pandas. They load the first time your code imports them; that first load is about 8 MB.
- Scripts that call input(): put the input lines into the Stdin field before you press Run.
- Errors show the real Python traceback with matching line numbers.
- The draft is saved in this browser as you type.
- Save snippets, rename them, reopen them later. They are stored on this device only.
- Download the code as a .py file. Copy the output in one click.
Test Python code online
A Python code playground is the quickest way to check a short program. Use it as a Python tester:
- Paste a snippet from a lesson or an answer and see what it prints.
- Check an exercise: if it fails, the traceback names the line.
- Give input() different values through the Stdin field and run again.
- Execute Python online on a computer where you cannot install Python.
Paste a whole file and it works as a Python script tester too. For lessons it is a Python coding playground with nothing to install and no sign-up.
Limits
- Only the standard library, numpy and pandas. Other packages cannot be installed.
- No plots and no windows: matplotlib, turtle and tkinter are not available.
- Code cannot open network connections.
- Output is cut at 10,000 lines or 2 MB.
- Snippets live in this browser. Clearing site data removes them.
Python Runner is the same runner as a Chrome extension: run code you select on any page. About Python Runner
FAQ
Is my code sent to a server?
No. The interpreter runs in your browser. The site only serves static files.
Can I use it as a Python tester?
Yes. Paste a snippet, press Run and see what it prints, or the Python traceback with the line that failed. It works as a quick Python code tester for exercises and small scripts.
Which Python version is this?
Python 3.14, running on Pyodide.
Can I use numpy and pandas?
Yes. Import them as usual. The first import downloads the packages, later runs reuse them.
Can I install other packages?
No. Only the standard library, numpy and pandas are available.
Does input() work?
Yes. Type the input lines into the Stdin field, one line per input() call, then press Run.
Where are my snippets stored?
In this browser on this device. They are not synced and not uploaded.
Do I need an account?
No. There is no sign-up and no limit on the number of runs.