Skip to content
Runtime

Vercel Sandbox vs Cloudflare Sandbox Cloudflare is 36% cheaper per agent run

Runtime Cloud (withruntime.com) is 53% cheaper than either. Vercel runs microVMs, and Cloudflare runs containers.

Estimated compute cost2 vCPUs · 4 GiB · 60 s a run · 20 CPU-seconds busy

70% less than Vercel Sandbox53% less than Cloudflare Sandbox

1,000

Compute only, at list rates checked 25 October 2026 (Vercel Sandbox pricing, Cloudflare Containers pricing). Plan fees, network, taxes and free credits are left out. The worked example below shows the arithmetic.

Which is better, Vercel Sandbox or Cloudflare Sandbox?

It depends on where your app is built. For agents that mostly wait on a model, Runtime bills active CPU, as both rivals do, at a fraction of their rates. The job below costs $0.64, against $1.35 on Cloudflare and $2.12 on Vercel. Both can be called from any backend. Pick Vercel Sandbox if the app is deployed on Vercel, or if it needs up to 10,000 sandboxes running in parallel on Pro. Pick Cloudflare Sandbox if it runs on Workers and should share their bindings, started near your users.

At a glance

Vercel's figures are at the rates of its default iad1 region. Cloudflare's sandboxes run on Cloudflare Containers, so their prices are the Containers prices.

Vercel Sandbox Cloudflare Sandbox SDK Runtime
Isolation Firecracker microVM, own kernel A container in its own VM Firecracker microVM, own kernel
CPU $0.128 per active CPU-hour $0.072 per active vCPU-hour, metered in 10 ms steps $0.025 per vCPU-hour of measured CPU, with a small floor
Memory $0.0212 per provisioned GB-hour; 2 GB per vCPU $0.009 per provisioned GiB-hour; at least 3 GiB per vCPU $0.0075 per reserved GiB-hour, any amount
Disk 64 GB of ephemeral NVMe included $0.000252 per provisioned GB-hour Included while running; paused storage $0.08 per GB-month
Plan Hobby allowance free; usage beyond it needs Pro Workers Paid, at least $5 a month None; prepaid credit from $10
Called from Any backend, with a Vercel project and token A Cloudflare Worker, through a Durable Object binding Any backend; API, CLI, MCP server, JS and Python SDKs
When idle Stop keeps the filesystem; processes start again Filesystem-only snapshots; processes restart Pause keeps files, memory and processes while you have credit
Placement 19 regions, chosen per sandbox The nearest location that has the image One US region

Why is Cloudflare cheaper when both bill active CPU?

Because its rates are lower on both meters, which outweighs its larger memory floor. Cloudflare's active CPU costs $0.072 a vCPU-hour against Vercel's $0.128. Its memory costs $0.009 per GiB-hour against Vercel's $0.0212 per GB-hour. A 2 vCPU sandbox gets 4 GB on Vercel and must take at least 6 GiB on Cloudflare, plus disk. It still costs less. In the job below, Cloudflare's memory and disk come to $0.95 against Vercel's $1.41 for memory alone.

The gap widens as the code gets busier, because each extra CPU-second costs Vercel almost twice what it costs Cloudflare. Both still bill memory for the whole run while an agent waits on a model. Runtime's memory rate is the lowest of the three, and memory is sized separately from vCPUs.

What happens to an idle sandbox?

A Vercel sandbox that stops keeps its filesystem and starts its processes again. A snapshot keeps the filesystem too, and expires 30 days after its last use unless you change that. Cloudflare offers public-beta filesystem snapshots that expire 30 days after creation or last restore. Your application saves and restores them. They keep files, but not memory or processes.

A paused Runtime sandbox keeps files, memory and running processes, and the next request wakes it. A port shared through a preview is private by default. Vercel's exposed ports are public, and Cloudflare routes previews through your Worker:

TypeScriptimport { Sandbox } from "withruntime";await using sbx = await Sandbox.create({ idlePauseSeconds: 600 });await sbx.spawn("python3 -m http.server 3000");const preview = await sbx.previews.create(3000); // HTTPS, needs the tokenconst page = await fetch(preview.url, {  headers: { "x-runtime-preview-token": preview.token! },});console.log(page.status);

Cost for the same job

1,000 runs of a 2 vCPU sandbox. Each run lasts 60 seconds and keeps the CPU busy for 20 CPU-seconds: an agent that mostly waits for a model. Vercel gets 4 GB, its 2 GB per vCPU, and Runtime 4 GiB. Cloudflare's smallest custom 2 vCPU size has 6 GiB, and it gets 12 GB of disk, the disk of Cloudflare's 6 GiB standard-2 type.

Vercel$2.12
CPU
1,000 × 20 s / 3,600 × $0.128
$0.71
Memory
1,000 × 60 s / 3,600 × 4 × $0.0212
$1.41
Cloudflare$1.35
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
Runtime$0.64
CPU
1,000 × 20 s / 3,600 × $0.025
$0.14
Memory
1,000 × 60 s / 3,600 × 4 × $0.0075
$0.50

At 100,000 runs a month, the cost is $212.44 on Vercel, $135.04 on Cloudflare and $63.89 on Runtime. With both CPUs busy for the whole minute, it is $1.33 on Runtime, against $5.68 on Vercel and $3.35 on Cloudflare. Runtime is cheaper however busy the sandbox is. The Cloudflare figure assumes each sandbox is destroyed when its run ends. Plan fees, creations, Workers requests, Durable Object time, network and free allowances are left out.

Which one to pick

  • Pick Vercel Sandbox if your app is deployed on Vercel, or you need sandboxes in a region you choose, from 19, with up to 10,000 running in parallel on Pro.
  • Pick Cloudflare Sandbox if your app is built on Workers and you want sandboxes that share its bindings, started near your users.
  • Pick Runtime for active-CPU billing at a fraction of either rate, memory sized to the job, pause that keeps memory and processes, and private preview URLs, called from any backend with no platform to join.

Switch from either one

From Vercel Sandbox, change one import. Runtime's SDK runs code written for Vercel's, with no Vercel project or token:

TypeScriptimport { Sandbox } from "withruntime/vercel"; // was: from "@vercel/sandbox"
Pythonfrom withruntime.vercel import sandbox  # was: from vercel import sandbox

From Cloudflare's 0.x SDK, the sandbox code leaves the Worker for any server: getSandbox(env.Sandbox, name) becomes Sandbox.getOrCreate(name), sandbox.exec(cmd) becomes exec, and proxyToSandbox becomes box.previews.create(port). A Worker can also call Runtime directly with SDK 0.4.0 or later and the nodejs_compat flag, as Runtime vs Cloudflare shows.

Or give your coding agent the one instruction in migration. It switches the project on a branch, tests it on the free usage and reports the monthly saving. Credit you add within 30 days of signing up is matched, up to $1,000 in total. See also Runtime vs Vercel Sandbox and microVM vs container.

Runtime Cloud

Runtime runs the same job for 70% less than Vercel and 53% less than Cloudflare. 1,000 one-minute runs of a 2 vCPU sandbox cost $2.12 on Vercel, $1.35 on Cloudflare and $0.64 on Runtime. All three bill CPU as it is used. Runtime's rate is 80% below Vercel's and 65% below Cloudflare's, and it belongs to no hosting platform. Rates checked 25 October 2026.

Begin free with npx withruntime login. A Worker or a Vercel app moves over by the steps in the migration guide.

Sources

Facts on this page were checked on 26 October 2026.

Keep comparing.

100 free hoursin your first 30 days.

of a 1 GB machine

  • No credit card
  • Four sandboxes at once, 2 vCPU and 4 GiB each
  • Then prepaid credit from $10, no plan fee
Start free, no card
Start free, no card