Menu
PDF Tools
Image Tools
Converters & Utilities
Seller & Print Tools
Accounting & Business
Calculators
Text & Writing Tools
Developer & Web Tools
Creator & Social Tools
Browser Utilities & Games
Document & Design Makers
Text & Developer Tools
Exam & Form Tools

Online Python Compiler

Write Python code and run it right in your browser, with no install and no account. The code runs in a worker of your own tab, so it is never sent to a server, and you can stop it at any time.

How to use Online Python Compiler online

  1. Write or paste code. Or choose an example.
  2. Add input if needed. One line for each input() call.
  3. Press Run. Or use Ctrl+Enter.
  4. Read the output. Press Stop to end a long run.

Why use this free Online Python Compiler

  • Real CPython in your browser
  • Whole standard library
  • Stop and time limit
  • Input for input()
  • Share link and save as main.py
  • Network switched off for your code

Python in your browser

This page runs Python code in a tab of your own browser. You write a program, press Run and read the output, with nothing to install and no account. The interpreter is Pyodide, which is the standard CPython program compiled to WebAssembly, so the language behaves like the Python you would run on your computer.

What happens when you press Run

The first time, your browser downloads the Python files from this site, about twelve megabytes in all, and keeps them for next time. Python starts in a background worker, so the page stays responsive while your program runs. The output appears as the program prints it, with normal output and error messages in different colours.

Input, stop and time limit

The box under the editor holds the text for input(), with one line for each call. If the program asks for more lines than you gave, Python raises the usual end-of-file error. The Stop button ends a program at once, even one stuck in an endless loop, by closing the worker. A time limit of five, ten, thirty or sixty seconds stops anything that runs too long.

What you can and cannot do

The whole standard library is available, including json, re, math, datetime, collections, itertools, dataclasses, statistics and asyncio, and top-level await works. Packages that are not part of the standard library, such as numpy or requests, are not included, and pip does not work. The network is switched off for your code, so a program cannot fetch pages or send data out, and it cannot read files from your computer.

Share and keep your work

The editor has undo, redo, find and replace, and it keeps your last code on this device. A share link puts the code inside the address, after the hash sign, so it is never sent to a server when the link is opened. You can also save the code as main.py. A very large amount of output is cut after two hundred thousand characters so the page does not freeze.

Limits to know

The program runs in a single thread inside the browser, so heavy calculations are slower than on a computer, and a phone may run out of memory on a big task. There is no way to keep variables between runs, because every run starts clean. Programs that need graphics windows, sockets or files are not supported.

Online Python Compiler: frequently asked questions

Does my code leave my computer?
No. It runs in a worker inside your browser, and the network is switched off for it. A share link keeps the code in the address itself, not on a server.
Can I install packages with pip?
No. Only the standard library is available, and the page does not download packages.
Why does the first run take a few seconds?
Your browser has to download and start the Python files. Later runs in the same visit start at once, and the files are kept for future visits.
How do I stop a loop that never ends?
Press Stop, or wait for the time limit. Both end the worker. The next run starts Python again, which takes a moment.
How do I read a number typed by the user?
Use input() and type the lines in the input box before you press Run, one line for each call.
Which Python version is this?
The version of CPython that comes with the Pyodide build on this page. It is shown under the output after the first run.

Related searches for Online Python Compiler

  • Online Python Compiler online
  • free Online Python Compiler
  • Online Python Compiler online free
  • Online Python Compiler for mobile
  • Online Python Compiler without sign up
  • Online Python Compiler – Developer & Web Tools

Online Python Compiler is a free online tool on MAITBOX, in the Developer & Web Tools group. It runs in your browser, so what you type is not sent to a server. It works on Android and iPhone, and on Windows, Mac and Linux, with no download and no account.

More tools in Developer & Web Tools →

Search tools