BrowserPod 3.0 runs Rust BrowserPod 3.0 runs unmodified Rust programs in the browser Announcement
Using a coding agent? Not sure where to start? Talk to us
Sign up for Edge Get an Edge API key, with 1,000 free hours Contact us Talk to the team

Code sandboxes that run in the tab

BrowserPod is a microVM that runs in the browser. Run untrusted and AI-written code inside the browser's security boundary, on the user's own device.

Why sandbox in the browser

Running code you didn't write needs somewhere safe for it to happen. On a server that means provisioning, isolating and paying for a machine per user.

BrowserPod runs that code in the visitor's tab instead. It runs inside the browser's security boundary, on their own device, with the real Node.js, Rust, git and bash, so a sandbox costs you nothing and there's no pool to run out of.

That includes code an AI wrote. When a model generates a script, it can run in a pod on the user's device before anyone trusts it.

What people build

01

Sandboxes for user code

Let people paste, edit and run code in your product, contained by the browser.

02

Coding challenges

Run each submission in its author's own browser, apart from everyone else's.

03

Running AI-generated code

Run what a model writes before anyone trusts it, on the user's device.

04

Shareable reproductions

A bug report or example that runs in a link, with the files already in place.

What your sandbox gets

A real Linux-like environment for any code you hand it, contained by the browser, with nothing for you to host.

From code to running sandbox

  1. Install

    Add the npm package to your page. No key and no account.

  2. Boot a pod

    One call starts a Linux-like environment on the visitor's device.

  3. Run the code

    Write the code into the pod and run it with node, bash or a Rust binary.

  4. Share it

    When the code starts a server, a Portal turns it into a URL.

Run code in a sandbox

Write the code into the pod, then run it. The output streams to the terminal.

app.js
import { BrowserPod } from "@leaningtech/browserpod";

const pod = await BrowserPod.boot();
const terminal = await pod.createDefaultTerminal(document.querySelector("#console"));

const file = await pod.createFile("/home/user/main.js", "utf-8");
await file.write(untrustedCode);
await file.close();

await pod.run("node", ["main.js"], { terminal, cwd: "/home/user" });

Questions

Is it safe to run untrusted code?

Yes. The code runs inside the browser's sandbox, on the visitor's device, apart from your infrastructure and from every other visitor.

Do visitors need an account?

No. Pods run in their browser with no sign-up.

What does it cost?

Nothing for compute, which runs on each visitor's device. Only pods connected through BrowserPod Edge are metered, per connected pod-hour.

Can sandboxed code reach the internet?

Only when you connect the pod through BrowserPod Edge, which gives it npm, GitHub and API access through an allowlist.

Can we self-host BrowserPod?

Yes. Enterprise covers self-hosting the runtime and the network stack, vendoring it into your build and redistributing it in your product.

Stay informed with BrowserPod news

BrowserCode: a browser-based coding playground, powered by WebAssemblyBrowserCode is a free, open source, fully client-side coding playground. Open a tab, pick a template, clone a repo or pick an agent and start building. No account, no installs, no servers, no setup. Ana GabySoftware Engineer @ Leaning TechnologiesBeyond WASI: Running any Rust application in the browser with BrowserPod 3.0BrowserPod can now run real Rust programs in the browser, compiled from unmodified source with stock rustc and cargo. Yuri IozzelliSenior Software Engineer @ Leaning TechnologiesA Linux-like kernel in a browser tab - deep dive in the BrowserPod architectureHow the BrowserPod kernel supports running many Linux applications concurrently in the browser using WebAssembly. Alessandro PignottiCTO @ Leaning TechnologiesBrowserPod 2.0: in-browser WebAssembly sandboxes. Run git, bash, node, python...BrowserPod 2.0 ships with a real bash shell, git, and core Linux utilities. Yuri IozzelliSenior Software Engineer @ Leaning TechnologiesBrowserPod: universal in-browser sandbox powered by Wasm (starting with Node.js)Stefano De Rossi, Alessandro PignottiCEO @ Leaning TechnologiesBrowserPod: WebAssembly in-browser code sandboxes for Node, Python, and RailsBrowserPod Beta is live: zero latency in-browser code sandboxes in WebAssembly for Node, Python and Rails. Alessandro Pignotti, Stefano De RossiCTO @ Leaning TechnologiesBrowserPod: In-browser full-stack environments for IDEs and Agents via WasmBrowserPod is a WebAssembly-based, client-side container that brings full-stack dev environments to the browser, ideal for web IDEs, docs, and AI agents.Alessandro Pignotti, Stefano De RossiCTO @ Leaning Technologies