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
Sandboxes for user code
Let people paste, edit and run code in your product, contained by the browser.
Coding challenges
Run each submission in its author's own browser, apart from everyone else's.
Running AI-generated code
Run what a model writes before anyone trusts it, on the user's device.
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.
-
Sandbox
Isolated by the browser's sandbox, so untrusted and AI-written code can't reach the rest of the user's machine.
-
Process isolation
Every process runs in its own Worker, so one runaway program doesn't take the rest down with it.
-
Runs on the user's device
Every sandbox runs on its visitor's device, so compute costs you zero.
-
No concurrency limits
Every visitor gets their own sandbox, with no pool to exhaust on a busy day.
-
Portals
When the code starts a server, Portals give it a URL you can open and share.
From code to running sandbox
-
Install
Add the npm package to your page. No key and no account.
-
Boot a pod
One call starts a Linux-like environment on the visitor's device.
-
Run the code
Write the code into the pod and run it with node, bash or a Rust binary.
-
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.
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.










