Python Online Compiler
Write, run and share Python 3 in your browser. Live input, free, no sign-up.
# Welcome to the CodingHumans Python compiler.
# Press Run (or Ctrl + Enter) to execute your code.
name = input("What's your name? ")
print(f"Hello, {name or 'CodingHumans'}!")
squares = [n * n for n in range(1, 6)]
print("Squares:", squares)
Press Run to see the output.
Python examples to try
Hello, World
Print a line of text.
Reverse a string
Use slicing with a step of -1.
Check a prime number
Test divisors up to the square root of the number.
Fibonacci series
Print the first n Fibonacci numbers with a generator.
Add numbers from input
Read several numbers on one line and add them up.
Count words with a dictionary
Count how often each word appears.
How to run Python online
- Write or paste your Python code in the editor.
- Press Run, or Ctrl + Enter (Cmd + Enter on a Mac).
- When your program calls input(), type the answer in the output panel and press Enter.
- Press Share to copy a link to your code.
About this Python compiler
This free Python compiler runs real Python 3 (CPython compiled to WebAssembly) directly in your browser. There is no server queue: after the first load, every run starts instantly.
input() works the way it does on your own computer. The program pauses, you type the answer in the output panel, and it carries on. Popular packages such as numpy and pandas load automatically the first time you import them.
Your code runs in a separate background thread. If a loop never ends, press Stop to interrupt it without losing your code.
Frequently asked questions
›Is this Python compiler free?
Yes. It is free with no sign-up and no run limits. Your code runs in your own browser, which is what keeps it free.
›Does it support input()?
Yes. When your program asks for input, it pauses and you type the answer in the output panel. In a few older browsers that do not allow pausing, you can type all the input lines before you run instead.
›Which Python version is it?
Python 3.13, through Pyodide. Most of the standard library is available.
›Can I use numpy, pandas or other packages?
Yes for many popular scientific packages, including numpy, pandas, matplotlib and scipy. They download the first time you import them, so that first run takes a little longer.
›Why is the first run slower?
The first time, your browser downloads the Python engine (about 12 MB). It is cached after that, so later runs start immediately.