Skip to content
Devtoolry

Online Python Compiler

Run Python 3 code online with the full standard library and stdin input. It runs in your browser with Pyodide (WebAssembly), so your code stays on your device.

Runs in your browser · Nothing uploaded · No sign-up

Something not working, or missing a feature? Send feedback

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 Web Worker in your browser, so it never leaves your device.

How to use the Python Compiler

  1. Write or paste Python code.
  2. Add input lines in the stdin box for input().
  3. Click Run. The first run downloads the Python runtime (about 10 MB); later runs start instantly.

Example

Read input and print a result

Input

name = input()
print(f"Hello, {name}!")
print(sum(range(1, 11)))

Result

Hello, Ada!
55

With "Ada" in the stdin box. Each input() call reads the next stdin line.

Common mistakes

  • input() with an empty stdin box. There is no interactive prompt. Put every value your program reads into the stdin box, one per line, before you click Run. With nothing left to read, input() returns an empty string (so int(input()) raises ValueError) and the next call raises EOFError.
  • Third-party packages. import requests or import numpy fails because only the standard library is available. Use urllib, json, csv, statistics and the other built-in modules.
  • Network and files. The program runs in a browser sandbox, so it cannot open sockets or read files on your computer. Paste the data into the code or stdin instead.

Works well with the Python Compiler

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.

Which Python version is it?

Python 3, from the CPython build that Pyodide ships. Modern syntax such as f-strings, match statements and type hints works.

Is my code sent to a server?

No. Python runs in your browser with WebAssembly, so the code and its input stay on your device.

Is it a compiler or an interpreter?

An interpreter, like the python command on your computer: CPython compiles your code to bytecode and runs it immediately. "Python compiler" is simply what most people search for.

Can I run Python online without installing it?

Yes. Paste your code and press Run: Python 3.14 runs in your browser with WebAssembly, so there is nothing to install and no account to create. The first run downloads the runtime (about 10 MB), which your browser then caches.

How do I give input to a Python program online?

Type it into the stdin box before you click Run, one line per input() call. When the box runs out, the next input() returns an empty string and the one after raises EOFError. To read all of it at once, use sys.stdin.read().

Can I use NumPy or pandas?

Not in this compiler: only the standard library is available, so import numpy fails with ModuleNotFoundError. For NumPy, pandas or plotting, use a notebook service such as Google Colab or install Python locally.

How long can a Python program run?

Up to 5 seconds per run on the free plan and 15 seconds on Pro. A run that takes longer, such as an accidental infinite loop, is stopped.

Guides and tutorials