Python Playground

    Loading playground...

    Python playground: run Python online, free

    PythonExecutor is a free online Python compiler that runs real Python 3.12 right in your browser. There is nothing to install and no account to create: type your code in the editor and press Run, or Ctrl+Enter (Cmd+Enter on a Mac).

    Your code runs on your own device using Pyodide, the standard CPython interpreter built for the web. It is not sent to a server, and your files are saved in this browser so they are still there next time.

    What you can do

    Answer input() in the terminal
    When a program calls input(), it pauses and waits for you to type an answer, just like on your own computer. Many online compilers cannot do this.
    Install packages
    Type names such as numpy or pandas into the pip install box, then import them as usual.
    Work with several files
    Create files and folders in the sidebar, import one module from another, and run whichever file is open.
    Share your code
    The Share button copies a link that opens your files exactly as you left them.
    Switch to C or PHP
    Choose another language from the menu next to the file name to run C or PHP code.

    How to run Python code online

    1. Write or paste your code into the editor.
    2. Press Run, or Ctrl+Enter.
    3. Read the output in the terminal. If your program asks a question, type the answer there and press Enter.
    4. Change the code and run it again as often as you like.

    Frequently asked questions

    Is this a real Python interpreter?

    Yes. It is CPython 3.12 compiled to WebAssembly (Pyodide), so the language and the standard library behave as they do on a computer.

    Is it free, and do I need an account?

    It is free and there is no account. Your code and files are saved in your browser.

    Can my program use input()?

    Yes. When your program asks for input, the terminal waits for you to type an answer and press Enter.

    Which packages can I install?

    Pure-Python packages from PyPI, plus popular packages built for Pyodide such as numpy and pandas. Type their names into the pip install box.

    What can't it do?

    Because it runs inside your browser, programs cannot read files on your computer, and most network requests do not work. Very heavy calculations are slower than on a desktop computer.

    I am new to Python. Where should I start?

    Try the free Python course, which has short lessons with exercises that are checked in your browser, or browse the code examples.