GALAXY OF TOOLS

DEV SECTOR

Online Python Compiler and Runner

Run Python 3.13 in your browser with input(), tracebacks, numpy, pandas and matplotlib. Nothing is uploaded.

Python is not loaded yet. Press Run (about 12 MB, once).
Input for input() (one line per call)
First 15 Fibonacci numbers:
[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377]
Sum: 986

Python runs in your browser as WebAssembly, in a background thread, so Stop can end an endless loop. Your code is never uploaded. Press Esc, then Tab, to move focus out of the editor.

Runs entirely in your browser. Nothing you enter or upload is sent to a server.

An online Python compiler that runs in your browser

This online Python compiler runs real Python 3.13 (CPython compiled to WebAssembly by the Pyodide project) inside your browser tab. Type or paste code, press Run and see the output, errors and tracebacks below. There is no account, no server queue and no upload: your code runs on your own device.

It handles the things people actually need from an online interpreter: input() reads from a box where you list the answers; error tracebacks show your file and line numbers; numpy, pandas, matplotlib and the other packages in the Pyodide distribution are fetched automatically when your code imports them; and pure-Python packages from PyPI can be installed with micropip. Matplotlib figures appear as images under the output.

The first run downloads about 12 MB (the interpreter and its standard library) and then the browser caches it. If you only want to run Python snippets, this is usually faster than installing anything. C, C++ and Java compilers need a server-side toolchain and are not offered here.

How to use the Online Python Runner

  1. Write or paste Python code into the editor, or pick a ready-made example.
  2. If the program calls input(), open Input for input() and type one line per call.
  3. Press Run (or Ctrl + Enter). The first run loads Python; later runs start immediately.
  4. Read the output. Normal output is shown in the default colour and errors in red. Figures drawn with matplotlib appear under the text.
  5. Press Stop if the program never ends, Copy output to take the result with you and Save .py to download the script.

Online Python Runner features

Real Python 3.13

Pyodide runs CPython itself, so syntax, the standard library (json, datetime, collections, dataclasses, asyncio…) and error messages match the desktop interpreter.

input() without a blocking prompt

Answers come from the stdin box, which also makes runs repeatable. Missing answers give the usual EOFError.

Clean tracebacks

Errors show only your own lines, as File "<main>", line 5, followed by the exception.

Packages on demand

Importing numpy, pandas, scipy, sympy, matplotlib and many more downloads them from the Pyodide package set; await micropip.install("name") adds pure-Python wheels from PyPI.

Stop button

Python runs in a background worker. Stop ends an infinite loop, and the interpreter restarts on the next run.

Fresh start every run

Each run uses a new __main__ namespace, so leftover variables never hide a bug.

What works and what does not

FeatureIn this runner
Standard libraryWorks, including re, math, random, statistics, itertools
Top-level awaitWorks: await asyncio.sleep(1) needs no wrapper
numpy, pandas, scipy, sympy, matplotlibLoaded automatically on import (several MB each, first time only)
Other PyPI packagesOnly pure-Python wheels, with micropip. Packages with C extensions that are not in Pyodide will not install
Network requestsLimited by browser rules (CORS); requests and sockets do not work like they do on a desktop
Threads and subprocessesNot available in WebAssembly
FilesA temporary in-memory file system; it is cleared when you reload the page
Interactive windows (tkinter, pygame)Not available

Tips

  • Write print(...) for output; the last expression is not echoed as in a REPL.
  • To test a function with several inputs, call it in a loop instead of using input().
  • For long calculations the page stays responsive because Python runs in a worker, but very heavy loops will be slower than on a desktop; a 10 to 30 times slowdown for pure-Python code is typical.
  • Need to check data formats while you code? The JSON Formatter, Regex Tester and Online SQL Compiler run in the browser in the same way.

Library and licence

Python runs through Pyodide 0.29.5 (Mozilla Public License 2.0, pyodide.org), loaded unmodified from the jsDelivr CDN. Python itself is under the PSF licence; packages keep their own licences.

Online Python Runner FAQ

How do I run Python code online?

Type the code into the editor and press Run. The output appears below. The first run downloads the Python engine, about 12 MB, which the browser then keeps.

How do I use input() in this online Python compiler?

Open “Input for input()” and write one answer per line. Each input() call takes the next line. A prompt such as input("Name? ") is shown in the output, and you do not need to type the answer there.

Can I use numpy, pandas or matplotlib?

Yes. Import them and the page downloads them on demand. Matplotlib charts are drawn as images below the output when your code calls plt.show().

Is my code uploaded to a server?

No. It runs on your device. The only downloads are the Python engine and any packages you import, from public CDNs; micropip contacts PyPI only when you call it.

Why is the first run slow?

The interpreter, standard library and any packages must be downloaded once. After that the browser cache makes later runs and later visits fast.

Can it run C, C++ or Java?

No. Those need a compiler toolchain that does not run reliably in a browser tab. This page runs Python only.

You might also need