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

Sandbox

The browser's sandbox, around every pod

Every pod runs inside the browser's own security boundary. Untrusted and AI-written code runs on the user's device without reaching the rest of their machine.

Isolation you don't have to build

01

The most battle-tested boundary

The browser sandbox exists to keep hostile code away from the device, and it is tested continuously at internet scale.

02

No cookies leave the page

Requests from a pod are sent without the page's cookies, so code in a pod can't act as the signed-in user.

03

Files stay on the device

A pod's files live in the browser's own storage. Nothing is uploaded, and the rest of the device is out of reach.

04

Built for agent output

Run AI coding agents, or the code they write, without handing them your infrastructure.

How the sandbox works

A pod is a set of Web Workers running BrowserPod's WebAssembly kernel inside the tab. Everything a program does, from reading a file to opening a socket, goes through that kernel, and the kernel only has what the browser gives any web page.

So a pod inherits the browser's isolation: the same boundary that keeps a malicious website away from the user's files, their other tabs and the operating system. There's no hypervisor, container runtime or server needed to contain the code.

The network follows the same rule. Without Edge, a pod reaches the internet through the page's own fetch(), without the page's cookies and only to servers that allow cross-origin requests. With BrowserPod Edge, traffic goes through our network under an allowlist, with request logs attributed to your account.

What you need to know

Serve the page cross-origin isolated

Set Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy headers. Third-party scripts on the page need CORP headers to load alongside them.

The page stays in control

Your page creates the pod, writes its files and reads its output through the API. Code inside the pod runs in Web Workers, apart from the page's own scripts.

Run code you didn't write

Write the code into the pod's filesystem and run it. Whatever it does happens inside the pod.

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

// Boot a pod, no API key needed
const pod = await BrowserPod.boot();
const terminal = await pod.createDefaultTerminal(document.querySelector("#console"));

// Code from a user or an agent
const file = await pod.createFile("/home/user/untrusted.js", "utf-8");
await file.write(generatedCode);
await file.close();

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

Questions

Can code in a pod reach the user's files?

No. A pod has its own filesystem, kept in the browser's storage, and no access to the rest of the device.

Does a pod need a server?

No. The pod runs in the tab. The runtime downloads from our CDN, and nothing else is needed unless the pod needs the internet, which is what BrowserPod Edge is for.

Is BrowserPod open source?

No. It is free for any use under the BrowserPod Community Licence, a short licence.

What can a pod reach on the network?

Without Edge, only servers that accept cross-origin requests, through the page's own fetch() and without its cookies. With BrowserPod Edge, the domains on your allowlist, with requests logged to your account.

Does BrowserPod send telemetry?

No. The runtime downloads from our CDN, which sees the user's IP address and the page's origin, and sends us nothing else. Code and files stay on the device.

Is it safe to run AI-generated code?

That's what it's built for. The code runs inside the browser's sandbox on the user's device, with no access to their files or to your infrastructure.

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