We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

Free Online Python Compiler and Playground

Write, run, and debug Python 3 in your browser. No installation required.

Edit the sample project above or replace it with your own Python code, then press Run. The Python 3 interpreter runs in your browser through WebAssembly, so you don't need to install Python or create an account.

Use it to test a short snippet, trace an error, or work across a few Python files without setting up a local development environment.

How to use the online Python compiler

  1. Edit main.py, or add another .py file for a multi-file program.
  2. Press Run to execute the code and read its printed output or traceback in the console.
  3. Keep experimenting. Your code is saved in this browser until you reset it or clear your local site data.

What this Python playground supports

  • Python 3 in the browser. Run code without downloading Python or configuring an IDE.
  • Multi-file programs. Work with up to five Python files and import them from main.py.
  • Supported packages. Import packages available in the Pyodide runtime; the editor loads supported dependencies when you run the code.
  • Local autosave. Leave the page and come back without losing the code saved in this browser.

Learn Python by writing code

A playground is useful when you know what you want to test. For a structured introduction to variables, functions, loops, data structures, testing, and debugging, work through the hands-on beginner course.

Python course for beginners

(it takes 2 minutes)

Online Python compiler FAQ

Yes. You can edit and run Python code without installing anything or creating an account. Your work is saved in this browser. You only need an account to create a share link.