Cloudflare Sandbox vs Morph: pricing, snapshots and limits
Cloudflare bills a Worker-run container by active CPU; Morph bills full VMs by size and can branch a running machine, memory included.
Runtime comes in 53% under Cloudflare and 62% under Morph on the same job, and it can fork a live sandbox too. 1,000 one-minute runs at 2 vCPU cost $1.35 on Cloudflare, $1.67 on Morph and $0.64 on Runtime. Runtime's CPU is metered at $0.025 a vCPU-hour, and a fork carries memory and running processes, with no plan to buy first. Rates checked 23 September 2026.
Estimated compute cost
53% less than Cloudflare Sandbox62% less than Morph
2 vCPUs · 4 GiB · 60 s a run · 20 CPU-seconds busy
Compute only, at list rates checked 23 September 2026 (Cloudflare Containers pricing, Morph Cloud pricing). Plan fees, network, taxes and free credits are left out. The worked example below shows the arithmetic.
At a glance
Cloudflare's column shows Containers rates, which is how its Sandbox SDK is billed. One Morph Compute Unit (MCU) covers 1 vCPU, 4 GB of memory or 16 GB of disk, and a machine pays for whichever it needs most of.
| Cloudflare Sandbox SDK | Morph | Runtime | |
|---|---|---|---|
| Isolation | A container in its own VM | Full virtual machines | Firecracker microVM, own kernel |
| CPU | $0.072 per active vCPU-hour, metered in 10 ms steps | $0.05 per MCU-hour for the machine's size | $0.025 per vCPU-hour of measured CPU, with a small floor |
| Memory | $0.009 per provisioned GiB-hour; at least 3 GiB per vCPU | Inside the MCU: 4 GB per MCU | $0.0075 per reserved GiB-hour |
| Plan fee | Workers Paid, at least $5 a month | Free with no credit; Developer $40 and Team $250 a month | None; prepaid credit from $10 |
| Free start | No free tier; the plan includes 375 vCPU-minutes a month | 1,000 MCUs with the $40 Developer plan | 50 sandbox hours, no card |
| Snapshots | A directory backed up to R2, restorable by any sandbox | Memory and disk; Infinibranch to hundreds of replicas | Memory and processes; forks of 1 to 10 running copies |
| When idle | Sleeps after 10 idle minutes by default; files are lost | Devboxes scale to zero and keep their memory | Pause keeps files, memory and processes |
Can I snapshot and branch a running sandbox?
On Morph, yes: that is what it is built around. A Morph snapshot captures a machine's memory and disk, and Infinibranch branches a running machine, memory included, to hundreds of parallel replicas.
On Cloudflare, not in that sense. The Sandbox SDK backs a directory up to R2, and any sandbox can restore it, but running processes and memory are not part of the backup, and a sandbox that sleeps loses its files.
Runtime sits between them. A fork copies a running sandbox with its files, memory and running processes into 1 to 10 new running sandboxes, answered together. A snapshot keeps the machine to start more copies from later, for 1 to 365 days:
TypeScriptimport { Runtime, Sandbox } from "withruntime";const runtime = new Runtime();await using base = await Sandbox.create();await base.exec("pip install --quiet requests");const [a, b] = await base.fork({ count: 2 }); // both running, answered togetherawait Promise.all([a!.stop(), b!.stop()]);// Or keep the machine to start copies from later:const snapshot = await base.snapshot({ name: "with-requests", retentionDays: 7 });await using later = await runtime.sandboxes.create({ snapshot: snapshot.id });await runtime.snapshots.delete(snapshot.id);The snapshot a fork takes is deleted when the fork ends and is not billed. See sandbox fork and sandbox snapshot.
Cost for the same job
The priced job is 1,000 runs on 2 vCPU of 60 seconds each, with the code working for 20 CPU-seconds per run. Morph counts 2 vCPUs with 4 GB as 2 MCUs, and Runtime is given 4 GiB. Cloudflare will not go below 3 GiB per vCPU, so it is priced at 6 GiB, plus the 12 GB of disk its own example uses.
TextCloudflare 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.35Morph Size 1,000 × 60 s / 3,600 × 2 MCU × $0.05 = $1.67Runtime 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.64Per month at 100,000 runs, that is $135.04 on Cloudflare, $166.67 on Morph and $63.89 on Runtime. For a job with both CPUs busy for the whole minute, it is $1.33 on Runtime, $3.35 on Cloudflare and $1.67 on Morph. Of the two rivals, Cloudflare wins while a run stays under about 36 of its 120 CPU-seconds, and Morph's flat MCU charge wins past that. Cloudflare's total assumes a sandbox is destroyed when its run is over. Plan fees, included credit, Workers requests, Durable Object time, storage, network and taxes are outside the totals.
Which one to pick
- Cloudflare Sandbox for an app that already runs on Workers and wants sandboxes in the same account, with the same bindings, near its users.
- Morph for branching on a large scale, one running machine copied to hundreds of replicas, or for shared dev environments that scale to zero and keep their memory.
- Runtime for forks and snapshots that keep memory and processes at a measured $0.025 a vCPU-hour, about a third of Cloudflare's rate, with no plan fee. Search and evaluation over forks are covered in RL environments.
Porting from each
Cloudflare's getSandbox(env.Sandbox, name) corresponds to
Sandbox.getOrCreate(name), sandbox.exec(cmd) to exec, and
proxyToSandbox to box.previews.create(port). Morph's concepts carry over
nearly word for word: start a Runtime sandbox for an instance, snapshot()
and sandboxes.create({ snapshot }) for snapshot and restore, and fork()
for a branch.
Or hand the job to a coding agent with the one instruction in
migration, which ports the project on a branch and tries it
on the free trial. From Cloudflare, npx withruntime switch --from cloudflare
before the first top-up earns matching credit, up to $100. Side by side:
Runtime vs Cloudflare and
Runtime vs Morph.
Sources
Rates checked 23 September 2026.
- Cloudflare Containers pricing, Containers limits and instance types, Sandbox backup and restore, Sandbox lifecycle
- Morph Cloud pricing, Morph Devboxes, Morph snapshots
- Runtime pricing, JavaScript SDK
Facts on this page were checked on 25 September 2026.