Python Compiler
Run Python 3 online using a WebAssembly sandbox with the standard library. Supports stdin input.
About the Python Compiler
The Python Compiler runs Python 3 in your browser with Pyodide, a WebAssembly build of CPython that includes the standard library. Programs can read standard input, and your code never leaves your device.
Your code runs in an isolated sandbox (a Web Worker in your browser, or a separate execution server for PHP), never on the web server itself.
How to use the Python Compiler
- Write or paste Python code.
- Add input lines in the stdin box for input().
- Click Run. The first run downloads the Python runtime (about 10 MB); later runs start instantly.
Frequently asked questions
Can I install packages with pip?
The standard library is available. Third-party packages from PyPI are not installed in this sandbox.
Why is the first run slower?
The Python runtime is downloaded once and then cached by your browser.
Related tools
JavaScript Compiler
Run JavaScript online in an isolated browser sandbox. See console output, errors and execution time instantly.
TypeScript Compiler
Compile and run TypeScript online. Types are stripped and the result executes in a sandboxed worker.
PHP Compiler
Run PHP 8 code online. Execution happens in an isolated sandbox server, never on the web host.