# Cloudflare Sandbox alternatives in 2026: 15 agent sandboxes ranked by cost Runtime Cloud (withruntime.com) costs 53% less than Cloudflare Sandbox. Northflank also costs less. ## What is the best alternative to Cloudflare Sandbox? It depends on whether your code lives on Workers and what a pause must keep. For agents that mostly wait on a model, Runtime has the lowest cost: $0.64 for the job below, against $1.35 on Cloudflare. Runtime is called from any backend, with no Worker. Its pause keeps memory and processes, not only files. Stay on Cloudflare if the app already runs on Workers. Pick Northflank to run sandboxes in your own cloud account, and Daytona for GPUs or Windows. ## 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. - **Processes restart.** Cloudflare's public-beta snapshots preserve the writable filesystem, but not memory or processes. Your application saves and restores snapshots. They expire 30 days after creation or last restore. - **Features have been removed.** Cloudflare removed the Sandbox SDK desktop in version 0.12.0, 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? 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 Cloud** | 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 | Prime Sandboxes (5 GiB disk) | microVM, own guest kernel | Allocated vCPUs while running | $1.52 | | 5 | Fly Machines, `performance-2x` with 4 GB | Firecracker microVM | The machine's size while started | $1.53 | | 6 | Morph, 2 MCUs | Full virtual machines | The machine's size in MCUs | $1.67 | | 7 | Vercel Sandbox, `iad1` (4 GB) | Firecracker microVM, own kernel | Active CPU | $2.12 | | 8 | Freestyle (32 GiB disk) | Full Linux virtual machines | Allocated vCPUs | $2.25 | | 9 | Fly Sprites (4 GB in use) | Firecracker microVM | Measured CPU | $2.40 | | 10 | CodeSandbox SDK, a Nano VM | Firecracker microVM | The VM's size, by the minute rounded up | $2.48 | | 11 | E2B | Firecracker microVM, own kernel | Allocated vCPUs | $2.76 | | 12 | Daytona | Containers by default; VM class separate | Allocated vCPUs | $2.76 | | 13 | Blaxel (4 GB) | Lightweight virtual machines | Included with memory, active time | $3.45 | | 14 | Modal Sandboxes (1 physical core) | gVisor or a VM runtime | Requested or used, whichever is higher | $3.97 | | 15 | AWS Lambda MicroVMs, Arm | Firecracker microVM | Baseline vCPUs while running | $4.20 | | 16 | Runloop, a `MEDIUM` devbox | microVM, with a container inside | Allocated CPUs while running | $5.33 | ## Cost for the same job The calculations for Runtime, Cloudflare, Fly Machines (the next cheapest microVM) and Vercel (the other active-CPU provider): ``` 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.0916704 = $1.53 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 ``` About two thirds of Cloudflare's figure is memory, from the 3 GiB-per-vCPU floor, rather than CPU. Keep both CPUs busy for the whole minute, and the totals move to $1.33 on Runtime, $3.35 on Cloudflare, $1.53 on Machines and $5.68 on Vercel. At 100,000 runs a month, the waiting job costs $63.89 on Runtime against $135.04 on Cloudflare. The Cloudflare figure assumes each sandbox is destroyed when its run ends. A sandbox left alone keeps billing memory and disk until its inactivity timeout ends. ## What each alternative offers a Cloudflare user ### 1. 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. ### 2. Fly Machines: a fixed price, busy or idle `performance-2x` with 4 GB is $0.0916704 an hour in `iad`. That keeps the busy job at $1.53, while Cloudflare's rises to $3.35. There are 17 regions. The root disk is temporary, and a volume holds files. ### 3. Morph: branch a live machine Billed $0.05 per MCU-hour, where an MCU is 1 vCPU, 4 GB of memory or 16 GB of disk. Infinibranch spreads one running machine, including its memory, across hundreds of replicas. ### 4. 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 the same time on Pro. ### 5. 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. The range reaches 64 cores and 128 GB, where Cloudflare stops at 4 vCPUs. ### 6. 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. ### 7. 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. ### 8. Blaxel: standby that keeps files Active memory at $0.0000115 per GB-second, with CPU included. When connections close, it goes to standby with files and processes held in a snapshot. It is back in about 25 ms. ### 9. Fly Sprites: a disk that survives sleep $0.0385 per measured CPU-hour and $0.021875 per GB-hour of memory in use. A Sprite pauses itself and never loses its 100 GB disk. ### 10. Modal Sandboxes: functions and GPUs alongside gVisor or a VM runtime, and CPU at $0.1419 per physical core-hour on the higher of request and use, next to Modal's functions. ### 11. Runloop: evaluation included A container in a microVM at $0.108 per CPU-hour and $0.0252 per GB-hour, plus disk, with tools to evaluate models on your own workload. ## Runtime Cloud 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. At 100,000 runs, that is $71 a month saved, with no $5 plan to hold and no 3 GiB-per-vCPU memory floor. Rates checked 25 October 2026. That job puts Runtime first in the table above, at $0.64. Measured CPU is $0.025 per vCPU-hour, never under a twentieth of a vCPU. Memory is $0.0075 per reserved GiB-hour. The vCPU count and memory are 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 while you have credit, 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). You can start free with `npx withruntime login`, with no Worker or Wrangler needed. For a Sandbox SDK project, the mapping below and the [migration guide](/docs/migrate) cover the move. ## How to switch from Cloudflare Sandbox A Sandbox SDK project uses a handful of calls. Each one maps to one Runtime call. Cloudflare's 0.x API, 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(sum([125, 250, 375]))'"); 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(); try { await box.files.write("/workspace/invoice.py", "print(sum([125, 250, 375]))\n"); console.log((await box.exec("python3 /workspace/invoice.py", { check: true })).stdout); } finally { await box.stop(); } ``` ```python from withruntime import Sandbox with Sandbox.create() as box: box.files.write("/workspace/invoice.py", "print(sum([125, 250, 375]))\n") print(box.exec("python3 /workspace/invoice.py", 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). Version 1.0 of the package drops `getSandbox`. There, `this.ctx.container.exec([...])` becomes `box.exec([...])`. 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 free usage, and reports what you would save a month. Credit you add within 30 days of signing up is matched, up to $1,000 in total. For a direct comparison, see [E2B vs Cloudflare Sandbox](/compare/e2b-vs-cloudflare-sandbox). For what a stop preserves, see [pause and resume a sandbox](/how-to/pause-and-resume-a-sandbox). ## Sources Fly.io prices checked 25 October 2026. - [Cloudflare sandbox lifetime](https://developers.cloudflare.com/sandbox/concepts/lifetime/), snapshot behavior checked 25 October 2026. Rates for every rival were checked 25 October 2026, and Cloudflare's Containers pricing was read again on 26 October 2026. - [Cloudflare Containers pricing](https://developers.cloudflare.com/containers/pricing/) - [E2B pricing](https://e2b.dev/pricing) Facts on this page were checked on 26 October 2026. - [Daytona pricing](https://www.daytona.io/pricing) - [Together: CodeSandbox SDK](https://docs.together.ai/docs/together-code-sandbox-legacy) - [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)