About this Python compiler
This free online Python compiler lets you write, run and test Python 3 code without installing anything. Type your program in the editor, press Run, and the output appears next to it in a moment.
Python runs entirely inside your browser using a WebAssembly build of the interpreter, so there is no account to create and your code is not sent to a server to be executed. It is a quick way to try a snippet, practise for a class, or check how a built-in function behaves.
How to use it
- Write or paste your Python code in the editor on the left.
- If your program calls input(), type the values in the Input box below the output, one value per line, in the order the program asks for them.
- Press Run (or Ctrl + Enter). The first run loads the Python runtime, which can take a few seconds; later runs are much faster.
- Read the output on the right. Errors are shown in red with the usual Python traceback.
Features
- Python 3 with the full standard library
- Supports input(), with values typed into the Input box
- No login, no install, works on phones and tablets
- Dark and light themes, and your code is saved in your browser automatically
- Download your code as a .py file
Good to know
- Programs that run for more than about 30 seconds are stopped.
- There is no network access from your code, and files are not kept between runs.
- Some third-party packages can be loaded when you import them, but support is limited and may be slow the first time.
Frequently asked questions
Is this online Python compiler really free?
Yes. There is nothing to pay for, no sign-up and no usage cap for normal use.
Does it support input()?
Yes. Type the values into the Input box, one per line, before you press Run. Each call to input() reads the next line. If your program asks for more values than you typed, Python raises an EOFError, just as it would when input runs out in a terminal.
Which Python version does it use?
It runs a recent Python 3 release compiled to WebAssembly. Python 2 is not supported.
Is my code sent to a server?
No. Python runs in your own browser. Your code is only stored locally in your browser so you do not lose it when you refresh the page.
Why is the first run slow?
The browser has to download and start the Python runtime the first time. After that it is cached, so later runs start much faster.
See it run step by step
Want to understand how your program works? Try the Python visualizer, which runs your code one line at a time and shows every variable.