README
main.py
README.md
Terminal
Run your code to see output here.

You Only Focus On Coding

Code execution previewCode execution preview

With no environment setup required, OnlinePy automatically executes your code and intelligently installs the necessary dependencies, allowing you to truly immerse yourself in a seamless programming experience.

Code Run History

Run history previewRun history preview

Automatic logging with every run and one-click rollback at any point in time turn every debugging session into a reusable learning experience.

Embed OnlinePy in Your Website

Add a fully functional Python IDE to your blog, docs, or course page with just two lines of code. No backend required — Python runs entirely in the browser.

1Floating widget (Recommended)

One script tag drops a bubble into the corner of your page — click it to pop open the IDE. Drag the bubble anywhere, drag the panel by its title bar, resize it from any edge, and pick the features it should expose.

Live demo: this very site uses it — look at the bubble in the bottom-right corner.

<script
  src="https://onlinepy.com/embed.js"
  data-widget
  data-position="bottom-right"
  data-size="420x620"
  data-features="run,output,theme"
></script>

2JS SDK

Add the script once, then use the custom element anywhere.

<script src="https://onlinepy.com/embed.js"></script>

<onlinepy-ide
  features="run,output,theme"
  code="print('Hello!')"
  style="width:100%;height:400px">
</onlinepy-ide>

3iframe

Simple and framework-agnostic. Just paste and go.

⚠️ Interactive input() and Stop need SharedArrayBuffer, which only exists on cross-origin isolated pages. Code still runs without it — the IDE degrades automatically instead of throwing. See Sharing & SharedArrayBuffer.

<iframe
  src="https://onlinepy.com/embed/?raw=print('Hello!')&hide=fileTree&hide=share&hide=embed"
  style="width:100%;height:400px;border:0;border-radius:8px"
  allow="cross-origin-isolated">
</iframe>

<!-- one ?hide=<key> per feature to drop; the IDE's
     Embed dialog generates the full list -->

Avoid the chat bubble / cookie bar

Every offset is configurable, in pixels or any CSS length. CSS variables win over the attributes, so the position can change with a media query or while a banner is open.

data-position="bottom-right | bottom-left | top-right | top-left"
data-offset="24"          data-offset-x="24"  data-offset-y="24"
data-offset-bottom="96"   data-panel-offset="96"   data-reserve="96"
data-gap="12"  data-z-index="2147481000"  data-safe-area="env"
/* host page, wins over the attributes */
:root { --onlinepy-offset-bottom: 96px }

Or from JS: OnlinePyWidget.setOffset({ bottom: 96 }) / setPosition("top-left")

Show only the features you need

Hide the file tree, share, embed, GitHub, history, sync, theme and every editor action — including undo, redo and reset — so an embedded IDE contains nothing you did not ask for.

<script src="https://onlinepy.com/embed.js"
  data-widget
  data-features="run,undo,redo,reset"></script>

<onlinepy-ide features="runOnly" code="print(1)"></onlinepy-ide>

Keys: fileTree, fileUpload, download, share, embed, github, history, sync, run, stop, autoRun, theme, layout, output, clearOutput, copyOutput, undo, redo, reset, clear, exportImage, newFile

Presets: all, none, minimal, readonly, runOnly, playground, shareOnly, editor

The panel title is always Powered by onlinepy and links to onlinepy.com — it is not configurable.

No backend needed
NumPy, Pandas, Matplotlib support
Multi-file via share ID
Light & dark theme
Free & no ads

Run Python in your browser.

No installation. No login. No ads. Just a clean, powerful Python IDE that runs entirely on your device.

Features

100% Private

Code runs locally in your browser. No data ever leaves your device.

Instant Execution

Runs locally via WebAssembly. No server delay, zero network latency.

No Login Required

Start coding instantly. No account, no email, no friction.

4GB Memory

Up to ~4GB WebAssembly heap for heavy computations.

Code to Image

Export code with syntax highlighting and terminal output as beautiful images.

No Ads

Clean, distraction-free coding environment.

Data Science Ready

Full Pyodide-powered support for popular data science libraries. Analyze and visualize data directly in your browser.

NumPyPandasMatplotlibSciPyscikit-learn

Use Cases

  • Test code snippets without IDE setup
  • Learn Python with zero configuration
  • Run data analysis and visualization
  • Prepare for coding interviews
  • Explore private datasets securely
  • Teach Python without installation

OnlinePy vs Others

Feature
OnlinePy
Others
Execution
Local browser (WASM)
Remote server
Privacy
Execution is local
Code uploaded to server
Speed
Instant, no network
Network dependent
Login
Not needed
Often required
Ads
None
Common
Code to Image
Yes, with output
Rarely

FAQ

Does OnlinePy send my code to a server?
No. All execution happens locally in your browser using WebAssembly. Your code stays on your device — unless you explicitly use the Share feature to generate a shareable link.
How fast is it?
Typically 70–90% of native speed. Since there is no network round-trip, execution feels instant.
Can I use NumPy and Pandas?
Yes. Full Pyodide-powered NumPy, Pandas, Matplotlib, SciPy, and scikit-learn support.
Can I export my code as an image?
Yes. Export code with syntax highlighting, gradient backgrounds, and terminal output — perfect for sharing.