Skip to content

Python Online Compiler

Run Python 3 in your browser, with input, pip packages and instant output.

Loading Python…

Pure-Python packages from PyPI and the scientific packages built for Pyodide (numpy, pandas, matplotlib, scipy, scikit-learn…) install in your browser. Packages imported by your code are added automatically when possible.

 

Write Python code and run it straight away in your browser. This online Python compiler runs real CPython 3 compiled to WebAssembly (Pyodide), so your code behaves like it does on your computer: print(), input(), classes, exceptions, f-strings and the standard library all work.

Type the values your program reads with input() in the Input box, one line per call, just like the input field of competitive programming sites. Need a library? Install it with pip in one click: numpy, pandas, matplotlib, scipy, scikit-learn and pure-Python packages from PyPI are supported. Your code stays on your device and is saved automatically in your browser.

How to use the Python Online Compiler tool

  1. Wait a few seconds for "Python ready" (the first visit downloads Python once; later visits are faster).
  2. Write or paste your code in the editor. Press Tab to indent.
  3. Type the program's input in the Input box, one line for each input() call.
  4. Optionally type package names (for example numpy pandas) and click Install.
  5. Click Run (or press Ctrl+Enter). Output and errors appear below with the run time.

Why use ToolOrca Python Online Compiler

  • Real Python 3 (CPython on WebAssembly), not a simulator
  • Standard input support for input() and sys.stdin
  • pip install with micropip: numpy, pandas, matplotlib, scipy and pure-Python PyPI packages
  • Stop button for endless loops; errors shown with tracebacks
  • Code and input saved in your browser; nothing is uploaded
  • Works on Windows, Mac, Linux, Android and iPhone

How input works

Online compilers cannot pause and ask you for input while the program runs, so you give all input before you click Run. Each line in the Input box is returned by one call to input(). For example, a program that reads a name and then a number needs two lines: Dara and 25.

To read several numbers from one line, use input().split(), as in the sample program. Reading sys.stdin.read() returns the whole input at once.

Which packages can I install?

Any package published on PyPI as a pure-Python wheel installs directly. Packages with C extensions work when Pyodide provides a WebAssembly build: numpy, pandas, scipy, matplotlib, scikit-learn, sympy, pillow, regex, pyyaml, beautifulsoup4 and many more. Packages that need native system libraries, multiple processes or raw network sockets (for example psycopg2 or tensorflow) cannot run in a browser.

Network access is limited to what browsers allow: urllib and requests-style calls only work with websites that permit cross-origin requests (CORS).

Limits

Python runs on your device, so speed depends on your computer or phone; it is typically 1–3× slower than native Python. Programs cannot open windows (tkinter, pygame) or read files from your disk. Stopping a program restarts Python, so installed packages need installing again.

Frequently asked questions

Is this a real Python interpreter?

Yes. It is CPython 3 compiled to WebAssembly by the Pyodide project, running in your browser.

How do I give input to my program?

Type it in the Input box before you click Run, one line per input() call.

Can I use numpy and pandas?

Yes. Type numpy pandas in the package box and click Install, or just import them: imported packages are added automatically when possible.

Is my code uploaded?

No. Code runs entirely in your browser and is only saved in your browser's local storage.

Can I run C, C++ or Java here?

This page runs Python. More languages are planned.