Online Python IDE (Pyodide)

Run Python directly in your browser using Pyodide and WebAssembly โ€” no server setup, no installation, and no waiting. Your code executes entirely on your machine using WebAssembly, ensuring fast performance and complete privacy. Install popular packages like NumPy, Pandas, Matplotlib, and more using micropip. Work with multiple files, organize your code across tabs, and build projects right from your browser. Whether you're a beginner learning Python or an experienced developer testing quick ideas, this full-featured Python environment has everything you need to write, run, and experiment with Python code instantly.

How to Use This Online Python IDE

This browser-based Python IDE lets you write, run, and debug Python code instantly โ€” no installation, no signup, no server. Here's how to get the most out of it:

  1. Write your code

    Type or paste Python code in the editor on the left. Syntax highlighting, auto-indentation, and bracket matching are built in.

  2. Run it

    Click the green Run button or press Ctrl + Enter. Output appears in the terminal on the right. Errors are shown in red with clear tracebacks.

  3. Install packages

    Open the โ‹ฎ menu at the top right and choose Install Python packages. Type a package name (e.g. numpy) and click Install. Or simply import it in your code โ€” missing packages are detected and installed automatically.

  4. Create multiple files

    Click the + tab above the editor to add files. Name them anything (e.g. utils.py) and import between them with standard Python syntax.

  5. Visualize data

    Use matplotlib or plotly to create charts. Call plt.show() or fig.show() and your plots appear in the Plots tab next to the terminal.

  6. Interactive input

    input() works naturally. Its prompt appears in the terminal: type your answer there and press Enter, and execution resumes with your response.

  7. Save your work

    Click the Save button (or press Ctrl + S) to download your code as a file to your computer.

  8. Open files

    Click the Open button to load a .py file from your computer into the editor.

  9. Customize the editor

    Open the โ‹ฎ menu and choose Settings to change the theme, font size, tab width, and other editor settings. Pick a tabbed, stacked or side-by-side layout with the Layout button.

  10. Stop execution

    If your code runs too long or enters an infinite loop, click the red Stop button to interrupt it immediately.

About Pyodide

A complete Python environment running entirely in your browser, powered by WebAssembly

Pyodide brings the full power of Python to your web browser. It is the official CPython interpreter (the same Python you'd install on your computer) compiled to WebAssembly using Emscripten. This means you get a genuine Python 3.12 environment with the complete standard library โ€” all running client-side, with zero server infrastructure. Whether you're learning Python, prototyping an idea, or running data analysis, everything happens instantly in your browser tab.

How It Works

When you click Run, your code is executed by the CPython interpreter compiled to WebAssembly. Pyodide runs inside a Web Worker, which means your code executes on a background thread โ€” the browser UI stays fully responsive even during heavy computation or large package installations. The Python runtime, standard library modules, and installed packages all live in your browser's memory. There's no compilation step, no server communication, and no waiting for remote execution.

Privacy & Security

Your code never leaves your browser. Nothing is uploaded, stored, transmitted, or processed on any server. Every aspect โ€” code execution, file handling, package downloads, and output rendering โ€” happens entirely within your browser tab. Package installations fetch directly from CDN and PyPI to your browser. When you close or refresh the page, everything is gone. This makes it ideal for working with sensitive data, proprietary algorithms, or any code you want to keep completely private.

Package Ecosystem

Pyodide ships with a rich set of pre-built scientific packages compiled to WebAssembly, including NumPy, Pandas, Matplotlib, SciPy, scikit-learn, Plotly, SymPy, NetworkX, Pillow, and many more. Missing packages are automatically detected and installed when your code imports them โ€” no manual setup needed. Additionally, any pure Python package on PyPI can be installed on-the-fly via micropip. Use the built-in package manager (โ‹ฎ menu, Install Python packages) to browse, install, and manage packages.

View the complete list of available packages

Graphical Output & Visualization

Create rich visualizations directly in the browser. Matplotlib plots are rendered as high-quality PNG images with a clean light theme, shown in the Plots tab next to the terminal, which opens by itself when a figure arrives. Plotly charts render as fully interactive HTML โ€” you can zoom, pan, hover for tooltips, and export images. Simply use plt.show() or fig.show() as you normally would. Multiple plots in a single run are listed in order as Figure 1, Figure 2 and so on, each with buttons to expand it to full size or download it, and each new run starts with a clear tab. This makes the environment perfect for data exploration, scientific visualization, and creating presentation-ready charts.

Multi-File Projects

Build real projects with multiple files. Click the + button to create new files, name them as you wish, and import between them using standard Python import syntax โ€” from mymodule import my_function works seamlessly. All files are written to a virtual filesystem before execution, so relative imports and cross-file references behave exactly as they would in a local Python project. This is perfect for organizing larger programs, separating utilities from main logic, or experimenting with modular code design.

Interactive Input

Python's built-in input() function is fully supported. When your code calls input(), its prompt appears in the terminal; type your response there and press Enter, and execution continues seamlessly. This enables interactive programs, command-line-style menus, games, quizzes, and any code that requires user input during runtime.

Limitations & Things to Know

While Pyodide provides a remarkably complete Python environment, there are some inherent limitations of running Python in the browser:

  • No network access Modules like urllib, http.client, and socket cannot open network connections. Libraries like requests will import but HTTP calls will fail. This is a browser security restriction.
  • No native C extensions (unless pre-compiled) Packages with C, C++, or Fortran components only work if they've been specifically compiled for WebAssembly and included in the Pyodide distribution. Most popular scientific packages (NumPy, Pandas, SciPy, etc.) are already included. Pure Python packages always work.
  • No file system persistence Files created during execution (via open(), os.mkdir(), etc.) exist only in memory. They are lost when you refresh or close the page. Your editor code is preserved in the browser, but runtime-generated files are not.
  • No threading or multiprocessing The threading and multiprocessing modules are not functional. Python runs in a single Web Worker thread. Async code with asyncio works for cooperative concurrency.
  • Initial load time The first run downloads the Pyodide runtime and core packages (~15 MB). Your browser caches this, so subsequent visits load almost instantly. Large packages like Pandas or SciPy require additional downloads on first use.
  • Memory limits The environment shares memory with your browser tab. Very large datasets or memory-intensive operations may hit browser memory limits (typically 1โ€“4 GB depending on your device and browser).

Perfect For

  • Learning Python and experimenting with code
  • Data analysis and visualization prototyping
  • Algorithm practice and coding challenges
  • Quick scripts and calculations
  • Teaching and demonstrations
  • Working with sensitive code that must stay private
  • Environments where you can't install Python locally

Contact Us

If you encounter a bug or have questions or suggestions for improvements, please send us an email at support at online-python.com.

Close file?

    This can't be undone.

    Save Code

    Some files are already open

      Reset Code

      You are about to reset your code to the default template. Please be sure to save your code before resetting. This will:

      • Remove all your current code changes
      • Close all additional tabs
      • Return to the initial starter code

      Share your code

      Settings

      Appearance

      14 px
      Layout

      Editing

      Install Python packages

      Install packages from PyPI with micropip. They run in your browser with Pyodide, so a package must be pure Python or have a Pyodide-compatible wheel.

      Separate several names with commas.

      Popular packages Click to install

      Installed

      No packages installed yet.
      All packages available in Pyodide
      About Pyodide

      Pyodide brings the CPython interpreter to the web through WebAssembly, giving you packages like NumPy, Pandas, Matplotlib and SciPy, all running locally on your device. Your code never leaves your browser, so it stays private and runs without server latency.

      Limitations
      • Browser-based execution: All Python code runs entirely in your browser using WebAssembly. Nothing is sent to a server, so your code stays on your machine.
      • No filesystem or network access: Pyodide runs in a sandbox. You can't read or write local files, make HTTP requests, or use sockets.
      • Limited package support: Only pure-Python packages and selected compiled packages (NumPy, Pandas and others) are available through micropip. Packages that need system-level C libraries may not work.
      • Initial load time: The Pyodide runtime (about 15 MB) downloads on your first visit. Later visits are faster thanks to browser caching.
      • Memory constraints: Your browser's available memory limits what can run. Very large datasets or long computations may slow the tab down or crash it.
      • No multithreading: Python's threading and multiprocessing modules aren't supported in the browser.

      Figure

      Program input

      Your code calls input(). Visualize records the whole run in one pass, so enter the values now, one per line, in the order the program asks for them.

      If the program asks for more values than you give, it stops with an EOFError.