# Cloudflare Sandbox alternatives: agent sandboxes ranked by cost Runtime is the cheapest Cloudflare Sandbox alternative, 53% less per job, and runs from any backend without a Worker. **Runtime runs Cloudflare's sandbox workload for 53% less, from any backend and with no Worker.** 1,000 one-minute runs of a 2 vCPU sandbox cost $0.64 on Runtime and $1.35 on Cloudflare, $71 a month saved at 100,000 runs, with no $5 plan to hold and no 3 GiB-per-vCPU memory floor. Rates checked 23 September 2026. ## Why do teams look beyond Cloudflare Sandbox? Cloudflare's Sandbox SDK runs on Cloudflare Containers, so it inherits the Containers prices and the Workers way of deploying. The reasons to move follow from that: - **It lives inside a Worker.** The SDK is called from a Worker on the Workers Paid plan (at least $5 a month), deployed with Wrangler and a local Docker build, through a Durable Object binding. A backend on another platform needs a Worker in between. - **Memory you did not ask for.** A custom size needs at least 3 GiB per vCPU, so a 2 vCPU sandbox pays for 6 GiB. Sizes stop at 4 vCPUs, 12 GiB and 20 GB. - **Idle sandboxes forget.** A sandbox sleeps after 10 idle minutes by default and starts again from its image, with its files gone unless you backed them up to R2 first. - **Features have been removed.** Cloudflare removed the Sandbox SDK desktop in version 0.10.2, in June 2026. - **No free tier.** The plan includes 375 vCPU-minutes a month; beyond that, active CPU is $0.072 a vCPU-hour. ## Which alternatives are cheapest? Priced at list rates, the same job everywhere is 1,000 runs of 60 seconds on a 2 vCPU, 4 GiB sandbox, doing 20 CPU-seconds of work each. Cloudflare cannot sell 2 vCPUs with 4 GiB, so its row uses the smallest size that fits, 6 GiB and 12 GB of disk. See [pricing](/docs/pricing#published-rate-comparison) for the sum behind each row; plan fees, storage, network, credits and negotiated prices are excluded. | # | Provider | Isolation | CPU billed on | 1,000 runs | | --- | -------------------------------------------------------------------------- | ------------------------------------------ | --------------------------------------- | ---------: | | 1 | **Runtime** | Firecracker microVM, own kernel | Measured CPU, with a small floor | **$0.64** | | 2 | Northflank | microVMs for CPU work, gVisor for GPU work | Allocated vCPUs | $1.11 | | 3 | Cloudflare Sandbox (2 vCPU, 6 GiB, 12 GB disk) (the one you are replacing) | A container in its own VM | Active CPU | $1.35 | | 4 | Fly Machines, `performance-2x` with 4 GB | Firecracker microVM | The machine's size while started | $1.44 | | 5 | Morph, 2 MCUs | Full virtual machines | The machine's size in MCUs | $1.67 | | 6 | Vercel Sandbox, `iad1` (4 GB) | Firecracker microVM, own kernel | Active CPU | $2.12 | | 7 | CodeSandbox SDK, a Nano VM | Firecracker microVM | The VM's size, by the minute rounded up | $2.48 | | 8 | E2B | Firecracker microVM, own kernel | Allocated vCPUs | $2.76 | | 9 | Daytona | Containers by default; VM class separate | Allocated vCPUs | $2.76 | | 10 | Blaxel (4 GB) | Lightweight virtual machines | Included with memory, active time | $2.76 | | 11 | Fly Sprites (4 GB in use) | Firecracker microVM | Measured CPU | $3.31 | | 12 | Modal Sandboxes (1 physical core) | gVisor, a user-space kernel | Requested or used, whichever is higher | $3.97 | | 13 | Runloop, a `MEDIUM` devbox | microVM, with a container inside | Allocated CPUs while running | $5.33 | ## Cost for the same job The working for Runtime, Cloudflare, the next cheapest microVM (Fly Machines) and the other active-CPU provider (Vercel): ``` Runtime CPU 1,000 × 20 s / 3,600 × $0.025 = $0.14 Memory 1,000 × 60 s / 3,600 × 4 × $0.0075 = $0.50 Total $0.64 Cloudflare CPU 1,000 × 20 s × $0.000020 = $0.40 Memory 1,000 × 60 s × 6 × $0.0000025 = $0.90 Disk 1,000 × 60 s × 12 × $0.00000007 = $0.05 Total $1.35 Machines Size 1,000 × 60 s / 3,600 × $0.0861 = $1.44 Vercel CPU 1,000 × 20 s / 3,600 × $0.128 = $0.71 Memory 1,000 × 60 s / 3,600 × 4 × $0.0212 = $1.41 Total $2.12 ``` Two thirds of Cloudflare's figure is memory, the 3 GiB-per-vCPU floor, rather than CPU. Put both CPUs to work, busy for the whole minute, and the totals move to $1.33 on Runtime, $3.35 on Cloudflare, $1.44 on Machines and $5.68 on Vercel. At 100,000 runs a month the waiting job is $63.89 on Runtime against $135.04 on Cloudflare. The Cloudflare figure assumes each sandbox is destroyed when its run ends. One left alone keeps billing memory and disk until it has been idle for 10 minutes. ## What each alternative offers a Cloudflare user ### 1. Runtime: an API, not a Worker Measured CPU at $0.025 per vCPU-hour, never under a twentieth of a vCPU, and $0.0075 per reserved GiB-hour, with the vCPU count and memory set separately, so a 2 vCPU sandbox can have 4 GiB. Each one is a Firecracker microVM with its own kernel. Pausing keeps files, memory and processes for 1 to 365 days, and a Linux desktop is built in. Any backend reaches it through the JavaScript or Python SDK, the CLI or the [MCP server](/docs/mcp). ### 2. Northflank: no memory floor per vCPU Allocated at $0.01667 per vCPU-hour and $0.00833 per GB-hour, with memory sized to the job. Every sandbox is a service with a deployment plan, run in Northflank's regions or your own AWS, GCP or Azure account. ### 3. Fly Machines: a fixed price, busy or idle `performance-2x` with 4 GB is $0.0861 an hour in `iad`, which keeps the busy job at $1.44 while Cloudflare's rises to $3.35. There are 18 regions; the root disk is temporary, and a volume holds files. ### 4. Morph: branch a live machine Billed $0.05 per MCU-hour, an MCU being 1 vCPU, 4 GB of memory or 16 GB of disk. Infinibranch spreads one running machine, memory included, across hundreds of replicas. ### 5. Vercel Sandbox: the other platform-bound option Firecracker with active CPU at $0.128 an hour and $0.0212 per GB-hour in `iad1`. Like Cloudflare it fits best when the app already runs there; it spans 19 regions and 10,000 sandboxes at once on Pro. ### 6. CodeSandbox SDK: sizes far past 4 vCPUs The Nano VM (2 cores, 4 GB) is $0.1486 an hour in credits, rounded up to the minute, and the range reaches 64 cores and 128 GB, where Cloudflare stops at 4 vCPUs. ### 7. E2B: sandboxes that stay put Allocation at $0.0504 per vCPU-hour and $0.0162 per GiB-hour, on Firecracker. Sessions run 1 hour on Hobby and 24 on Pro at $150 a month; the runtime is Apache-2.0. ### 8. Daytona: GPUs, Windows, two continents E2B's rates with a container by default and a separate VM class, GPU sandboxes and Windows machines, in the US and the EU. ### 9. Blaxel: standby that keeps files Active memory at $0.0000115 per GB-second, CPU thrown in. When connections close it goes to standby with files and processes held in a snapshot, and it is back in about 25 ms. ### 10. Fly Sprites: a disk that survives sleep $0.07 per measured CPU-hour and $0.04375 per GB-hour of memory in use. A Sprite pauses itself and never loses its 100 GB disk. ### 11. Modal Sandboxes: functions and GPUs alongside gVisor, and CPU at $0.1419 per physical core-hour on the higher of request and use, next to Modal's functions and scheduled jobs. ### 12. Runloop: benchmarks included A container in a microVM at $0.108 per CPU-hour and $0.0252 per GB-hour plus disk, with SWE-Bench and other public benchmarks built in. ## How to switch from Cloudflare Sandbox A Sandbox SDK project uses a handful of calls, and each maps to one Runtime call. Cloudflare, inside a Worker: ```js import { getSandbox } from "@cloudflare/sandbox"; export { Sandbox } from "@cloudflare/sandbox"; export default { async fetch(request, env) { const sandbox = getSandbox(env.Sandbox, "my-sandbox"); const result = await sandbox.exec("python3 -c 'print(6 * 7)'"); await sandbox.destroy(); return Response.json({ stdout: result.stdout }); }, }; ``` Runtime, from any server, in TypeScript or Python: ```ts import { Sandbox } from "withruntime"; const box = await Sandbox.create({ funding: "trial" }); try { console.log((await box.exec("python3 -c 'print(6 * 7)'", { check: true })).stdout); } finally { await box.stop(); } ``` ```python from withruntime import Sandbox with Sandbox.create(funding="trial") as box: print(box.exec("python3 -c 'print(6 * 7)'", check=True).stdout) ``` `getSandbox(env.Sandbox, name)` becomes `Sandbox.getOrCreate(name)`, which wakes a paused sandbox of that name or creates one. `proxyToSandbox` becomes `box.previews.create(port)`, an HTTPS address under `runtimehost.com` with a token. If the app stays on Workers, the Worker can call Runtime itself with SDK 0.4.0 or later and the `nodejs_compat` flag; the steps are in [calling Runtime from a Worker](/docs/cloudflare-sandbox-alternative#calling-runtime-from-a-worker). The move can also be handed to a coding agent with the one instruction in [migration](/docs/migrate): it moves the calls on a branch, runs them on the free trial and reports what you would save a month. Running `npx withruntime switch --from cloudflare` before your first top-up has that top-up matched with up to $100 of credit. For a direct comparison, see [E2B vs Cloudflare Sandbox](/compare/e2b-vs-cloudflare-sandbox); for what a sleep throws away, see [pause and resume a sandbox](/how-to/pause-and-resume-a-sandbox). ## Sources Rates for every rival were checked 23 September 2026, and Cloudflare's Containers pricing was read again on 25 September 2026. - [Cloudflare Containers pricing](https://developers.cloudflare.com/containers/pricing/) - [E2B pricing](https://e2b.dev/pricing) Facts on this page were checked on 25 September 2026. - [Daytona pricing](https://www.daytona.io/pricing) - [Together Code Sandbox](https://docs.together.ai/docs/together-code-sandbox) - [Northflank pricing](https://northflank.com/pricing) - [Blaxel pricing](https://blaxel.ai/pricing) - [Morph Cloud pricing](https://cloud.morph.so/web/pricing) - [Fly.io pricing](https://fly.io/pricing/) - [Modal pricing](https://modal.com/pricing) - [Vercel Sandbox pricing](https://vercel.com/docs/sandbox/pricing) - [Runloop pricing](https://www.runloop.ai/pricing) - Runtime [pricing](/docs/pricing) and the [Cloudflare comparison](/docs/cloudflare-sandbox-alternative)