Sign up free

Online Python Compiler

No Python to install. Open the page, write code, run it and see the result.

Online Python Compiler

About Online Python Compiler

This online Python compiler runs Python 3.14 (Pyodide) in your own browser, so your code isn't uploaded. Write your code and press Run or Ctrl+Enter; the output appears on the right. When the program reaches input(), type the answer right in the output and press Enter (recent Chrome, Edge and similar browsers), or write the input in the Input pane beforehand.

A project can have several files: .py files can import each other, data files can be read with open(), and the files your program writes appear under Files to view, download or add to the project. Turtle drawings and matplotlib charts appear under Graphics and save as PNG. numpy, pandas, matplotlib and other common libraries download the first time you import them. Errors are marked on their line, and common ones (indentation, a missing colon, the wrong type, an index out of range, full-width punctuation) come with a plain explanation. To watch your program step by step, use the Online Debugger.

How to use Online Python Compiler

  1. 1
    Write code

    Write Python on the left, or pick a ready-made program from Examples.

  2. 2
    Run it

    Press Run or Ctrl+Enter; when it asks for input, type it in the output.

  3. 3
    See the results

    The output, the line of any error, the files written and the drawings are on the right.

Why use Cubfile for this

  • Input while it runs

    The program stops at input() and waits for you, just as on your computer.

  • Drawings and charts

    Turtle drawings (animated) and matplotlib charts, saved as PNG.

  • Several files

    Add .py and data files; download the files your program writes.

  • Errors explained

    The line is marked and common mistakes are explained in plain words.

  • Nothing uploaded

    Runs in your browser, no sign-up, no limit.

FAQ

Online Python Compiler: questions and answers

Which Python version is it?
Python 3.14, built on Pyodide (CPython compiled to WebAssembly). Most of the standard library works.
Can I use numpy, pandas and matplotlib?
Yes. They download when you import them (slower the first time, then your browser keeps them). Libraries that need the network, the operating system or a desktop window don't work.
How do I type input in the online Python compiler?
In recent Chrome, Edge and similar browsers an input box appears in the output when the program reaches input(); type and press Enter. You can also write the input in the Input pane first, one line per input().
Does Python turtle graphics work in this compiler?
Yes. Moving, turning, circles, fills, colours and text are supported; the drawing is animated and can be saved as an image.
My program never ends. What now?
Press Stop or Esc twice. By default a run stops after 10 seconds; change the time limit in Options.
Share Online Python Compiler with a friendIt runs in any browser, and they can try it without signing up.

Related tools

GDB Online Debugger (C, C++, Python)Step through C, C++ or Python line by line, backwards too: breakpoints, variables, watches, the call stack and GDB-style commands.
C Online C CompilerCompile and run C with Clang in your browser: typed input, files, and checks that point at the line of a bug.
CPP Online C++ CompilerCompile and run C++11 to C++23 with Clang in your browser, with the standard library and <bits/stdc++.h>.
HTML HTML, CSS & JS Online EditorWrite HTML, CSS and JavaScript and see the page live, with a console, phone and tablet sizes and common libraries.
HTML HTML to Text ConverterTurn HTML into clean plain text, Markdown or CSV: keep the article only, list the links, convert tables, many files at once.
SEO Broken Link CheckerCheck every link on a page and list the ones that are broken or redirected.
DNS DNS LookupLook up A, AAAA, CNAME, MX, NS, TXT, SOA, CAA and other DNS records.
WEB Website Speed TestTime DNS, connection, first byte and download for a page, and see what slows it down.