sandbox-workersPLAYGROUND / DEMO
YOUR ACCOUNT. YOUR RUNTIMES.

Try it here.
Run it on your Workers.

Composable language runtimes, packaged for Cloudflare Workers.
Explore JavaScript, Python, Perl, and Ruby, then connect your own sandbox with Service Bindings.

FOUR INDEPENDENT RUNTIMES

Choose your language.

@sandbox-workers/*
SpiderMonkey · CPython · Perl · CRuby

Isolated per runBounded execution
JS
@sandbox-workers/javascriptSpiderMonkey
Live demo
Py
@sandbox-workers/pythonCPython 3.14
Live demo
Pl
@sandbox-workers/perlPerl 5.42
Live demo
Rb
@sandbox-workers/rubyCRuby 4.0
Live demo

Runtime Playground

This demo runs the same package you deploy.
experiment.js
JSON
OUTPUTReady

Make something happen.

Run your code to see the result here.
Your next idea starts with a line.

— ms— fuel
TAKE IT TO YOUR ACCOUNT

One package. A private Worker.

Deploy the runtime once. Call it from your application through a Service Binding.

v0.1.0 package preview
npm publication pending

Each button deploys one private runtime. Connect it with a Service Binding afterward. Read the deployment guide and runtime license notices.

01 / INSTALL

Create the runtime Worker

After the first npm release, use the initializer. A prebuilt Wasm engine is included; no C++ or Wasm toolchain needed.

pnpm dlx @sandbox-workers/cli init javascript my-sandbox
cd my-sandbox
pnpm install
pnpm dry-run
pnpm run deploy

Choose a unique Worker name before deploying. The generated Worker has no public URL. For now, install a local release tarball as described in the repository README.

02 / BIND

Connect your application

Add this Service Binding to your application's wrangler.jsonc. Both Workers belong to your Cloudflare account.

{
  "services": [{
    "binding": "SANDBOX",
    "service": "sandbox-javascript"
  }]
}

The service name must match the deployed runtime Worker. Keep your application's existing configuration.

03 / EXECUTE

Use the typed client

Install @sandbox-workers/core in your caller. The client uses your binding directly.

import { createSandbox } from
  "@sandbox-workers/core";

const js = createSandbox(env.SANDBOX);
const output = await js.runCode(
  "const x = Number(process.env.X);\nx ** 2",
  { envVars: { X: "12" } },
);
// { results: [{ text: "144" }], ... }
Already have a Worker project? Import the runtime directly.

Install @sandbox-workers/javascript and use this entrypoint in a dedicated Worker. Disable workers.dev and preview URLs, deploy it, then bind your application to its name.

export { default } from "@sandbox-workers/javascript";
LANGUAGE-NEUTRAL PROTOCOL

One contract. More runtimes.

POST code and env vars to /execute/<language>.
The Playground gateway selects the runtime from the URL path; /execute is an alias for /execute/javascript.

POST /execute/javascript
Content-Type: application/json

{
  "code": "const x = Number(process.env.X);\nx ** 2",
  "envVars": { "X": "12" }
}
GO DEEPER

Read the documentation.

Guides, runtime details, and the full API reference for every engine.

Open docs →