Online Python Compiler

Write Python 3 and run it right here. It runs in your browser, so your code stays on your device. Mistakes are marked in red with a suggested fix.

Ln 1, Col 1

Run Python online: no install, no signup

This online Python compiler runs Python 3 inside your browser using WebAssembly. There is nothing to install and your code is not uploaded. The first run downloads the Python engine (about 10 MB) and later runs start fast.

As you type, the editor checks your code: a missing : after if or for, wrong indentation, print without brackets, = instead of ==, and misspelled function names are marked with a ready fix. If the program stops with an error such as NameError, IndexError or ZeroDivisionError, a card explains what happened and how to fix it.

Use the Input tab to give your program values for input(), one value per line. Press Tab after a few letters (for example def, for, class) to write the whole line.

Frequently asked questions

Which Python version does it run?

Python 3 (Pyodide). The exact version is shown when the engine loads.

How do I use input()?

Open the Input tab, type one value per line, then press Run. Each input() call reads the next line.

Can I install packages?

Most of the standard library works. A limited set of extra packages can load automatically when you import them, but this is not guaranteed for every package. Code that needs files, network sockets or a window cannot run in the browser.

Is my code private?

Yes. Python runs fully in your browser and nothing is sent to a server.

Why is the first run slow?

The Python engine is about 10 MB and downloads once. After that it is cached by your browser.

Looking for another language? Open the full code editor with 100+ languages.