Initializing Python Environment

Lifting off into Mastery...

Master the IDE

Write Code: Type in the editor, or upload your own files — several at once, or a whole project as a .zip. Open tabs can import each other, so a real multi-file program runs here.
Run & Output: Click "Run Code" or press Ctrl/Cmd+Enter. Results and errors appear in the Output Console below.
Work with data: pandas, scikit-learn and Matplotlib are already here — no install. Use the Notebook when cells should share one session, and the practice datasets when you need something real to load.
Share & embed: Share sends the file you are on; Share+ sends every open tab. Both can also give you a runnable box for your own blog or a badge for your GitHub README — see how.
Keep Learning: Head to Academy for structured courses or Tutorial Lab for hands-on practice.

Core Features

Machine Learning Notebook Practice Datasets Bring Your Own Data Error Reference Python Academy Tutorial Lab Data Visualization Multi-File Projects Live Syntax Checker Recipe Library Phones & Tablets
Runs in your browser · No login · Free

PythonMastery

Code Python. No setup. Just mastery.

Starting Python Runs in your browser
main.py
📦 Package...
Tip: To see Seaborn charts, make sure you call plt.show() just like in Matplotlib!
Output Console
Output will appear here...
main.py

Free Online Python IDE — Run Python 3.13 in Your Browser, No Installation Needed

PythonMastery is a free, browser-based Python IDE powered by Pyodide 0.28 (WebAssembly), running Python 3.13. Write and run Python instantly, with no install and no account.

Why use PythonMastery?

  • New Embed it anywhere — turn any code into a box your readers can run, on your blog or course page, or a “Run in PythonMastery” badge for a GitHub README. How to embed Python →
  • A real editor, in a tab — the tools you’d expect from a desktop IDE: live syntax checking, find and replace, code folding, tabs that import each other (import helpers just works), input() and a Stop button, a Recipes menu of ready-made code, auto-saved history you can roll back, an expand view for focus, and a nudge to take a break after 90 minutes.
  • Nothing to install — Python 3.13 runs in this tab through WebAssembly. Open the page and write code; no account, no email.
  • Your code and data stay on your device — code runs in your browser, uploaded files stay in your browser’s storage, and share links carry the code inside the URL. We have no upload endpoint, so there is nothing for us to see.
  • Data science and ML, in the tab — NumPy, pandas, Matplotlib and scikit-learn are built in, and XGBoost, LightGBM and statsmodels run too. Train a RandomForest on a CSV you upload. PyTorch and TensorFlow are the honest exceptions: neither has a WebAssembly build. Working with your own data →
  • A notebook — cells share one session, plots render inline, and .ipynb files go in and out. Seven practice datasets load with one line.
  • Charts you can touch — Matplotlib as crisp images, Plotly live, so you can rotate a 3D scatter or zoom into a cluster.
  • 196 lessons in 17 tracks — from your first variable to a neural network trained from scratch, plus 45 Python errors explained and fixed, and exercises in the Tutorial Lab.
  • Made for phones and tablets — the same editor and lessons on any screen, with touch selection, three themes including Eye Saver, and weather in the background that matches your sky.

Frequently Asked Questions

Can I run Python in a browser without installing anything?
Yes. PythonMastery uses Pyodide — a WebAssembly port of CPython — to run Python 3.13 entirely in your browser. No installation of Python, pip, or any tool is needed.
Is my Python code private and secure?
Yes. Your code runs in your browser and is never sent to our servers, so we have no access to what you write or run. The little we do collect, anonymous page views and a rough location for the weather effect, is listed in the privacy policy.
What Python libraries are available online?
NumPy, pandas, SciPy, Matplotlib, scikit-learn, XGBoost, LightGBM, statsmodels, Pillow, SymPy and NetworkX are built into the runtime and need no install at all. Seaborn, Plotly, Pydantic and hundreds of other pure-Python packages install in seconds via micropip. PyTorch and TensorFlow are the notable exceptions — neither has a WebAssembly build, so they cannot run in any browser.
Can I train machine learning models in the browser?
Yes, genuinely. scikit-learn runs natively, so you can load a dataset, split it into train and test, fit a RandomForest or a linear regression, and score it — all in the tab, with no GPU and no account. XGBoost and LightGBM work too. For deep learning specifically, our network-from-scratch lesson trains a two-layer neural network in NumPy to 97% accuracy on handwritten digits in about a second.
Can I upload my own CSV or dataset?
Yes. Press Upload and pick a CSV, JSON, Excel sheet, image, PDF or a whole project as a .zip — several at once if you like. The file lands where Python can read it by name, so open("sales.csv") works with no path and nothing imported, and pd.read_csv("sales.csv") works once you add pandas from the package bar. You can then clean it, chart it, and train a model on it. The working with your own data lesson walks through the encoding and delimiter traps real exports arrive with.
Where is my uploaded data stored?
In your own browser, on your own device — never on our servers. We have no upload endpoint and no database; the file is handed to the Python runtime running inside your tab. It is kept in your browser's storage so it is still there when you come back tomorrow, and it stays until you remove it: the × on the file, the Clear data files button, or clearing this site's data in your browser. That button touches your data files only — your code, theme and lesson progress are left alone. Our privacy policy sets out every way those files go away.
Can I write a program with more than one file?
Yes. Open a tab per file and they import each other, so import helpers resolves to the helpers.py tab exactly as it would on your own machine. Download everything as a .zip, or share the whole project as one link — the code travels inside the URL rather than through us, so nothing you share is stored anywhere.
Is there a Jupyter-style notebook?
Yes. The Notebook gives you cells that share one Python session, so a DataFrame you load in the first cell is still there in the tenth. Tables and plots render inline, your work autosaves in the browser, and you can import or export a standard .ipynb file. No login.
Are there datasets to practice on?
Seven, ready to load with one line: housing prices, daily weather, retail orders, films, student results, subscription churn, and one deliberately messy signup file for cleaning practice. See Practice datasets.
Can I create charts and visualizations in the browser?
Yes, both still and interactive. Matplotlib works fully — including 3D surface plots — and renders as high-resolution PNG images inline, with options to download or copy. Plotly figures render live rather than as pictures: you can drag to rotate a 3D scatter, spin a loss surface, or zoom into a cluster.
Does it work on mobile devices?
Yes. PythonMastery is fully responsive and works on phones and tablets. The editor supports native touch selection with drag handles, and the layout adapts to portrait and landscape orientations.
Can I put runnable Python on my own website or blog?
Yes. Write the code in the playground, open Share (or Share+ for several files) and press Embed code: you get one line of HTML that shows a box your readers can edit and run inside your page. For GitHub there is a “Run in PythonMastery” README badge. Free, no account, and the code runs in the reader’s browser. Step-by-step guide.
Is this Python online compiler free?
Yes. No paid plans, no feature paywalls, no account. There are no ads today; if they come, they’ll be labelled and everything stays free.
Can I learn Python for free here?
Yes. Python Academy offers structured learning paths from beginner to advanced, covering Python fundamentals, data science, machine learning, and AI — all free, all in the browser.
Can I use input() in the browser?
Yes. PythonMastery supports Python's input() function with an inline text field in the console. You can build interactive programs that prompt for user input — no popups or workarounds needed.
Can I stop a running Python script?
Yes. Click the Stop button to interrupt execution at any time. It works for infinite loops, long computations, and even input() prompts. If a graceful stop isn't possible, the environment automatically restarts.

Our Mission

Plenty of people learn to code on a phone, a shared computer, or a laptop they aren't allowed to install anything on. We built PythonMastery with them in mind, and that made it better for everyone: open a browser, and Python is there.

The editor, the notebook and all 196 lessons are free, and they work the same on a phone or tablet as on a desktop. The lessons are written to be read: real examples, real numbers, and honest notes on where Python falls short.

196 is where we are, not where we stop. Here's what is being written next, and your feedback decides what comes first. Wondering whether this is still worth learning when a model can write the code? We wrote an honest answer, including the parts that argue against us.

Be Curious, Happy Learning — an open book with a rocket, lightbulb, and stars