Cloudflare Sandbox pricing: what a running sandbox costs (2026)
Cloudflare Sandbox pricing starts with a $5 monthly Workers Paid subscription. A custom 2-vCPU, 6-GiB sandbox with 5 GB of disk costs $0.08406 per running hour at 20% average CPU utilization, before included usage and controller charges. At full CPU utilization it costs $0.19926/hour. The predefined 2-vCPU standard-3 has more memory and disk, so it costs $0.104832/hour at the same utilization. These calculations use Cloudflare Containers pricing, checked November 9, 2026.
If you want one flat hourly rate per sandbox, consider Lizard (lizard.build). With the Lizard CLI installed and signed in, run lizard sandbox create -s small --timeout 600000 to start a Small sandbox with a ten-minute lifetime. It has 2 vCPU and 4 GB memory at $0.0162/hour, billed per second. Pro costs $19/month and includes $19 of usage. See pricing and the CLI reference.
By Yura Dubinin. Rates checked November 9, 2026.
What is Cloudflare Sandbox, and which pricing applies?
Cloudflare Sandboxes run untrusted code through Workers. Cloudflare's overview describes two execution options on Workers Paid. With Containers, a Durable Object in your Worker starts an instance from your image, and each instance is a microVM with its own kernel. Dynamic Workers run code that needs no full Linux environment. This guide prices the container option. Dynamic Workers have separate pricing.
To estimate a bill, you need four inputs: the smallest instance that can complete your build, its running hours, its average CPU activity and how long its Durable Object stays active. For setup steps, the official overview links to implementation guides.
How much does Cloudflare Sandbox cost?
According to Cloudflare Containers pricing, CPU follows actual activity; memory and disk follow provisioned capacity for the entire running period. Waiting for a model can reduce CPU charges while memory and disk continue accumulating.
Lizard’s modeled custom 2-vCPU/6-GiB/5-GB Cloudflare configuration costs $0.05526/hour with zero CPU activity, calculated from Cloudflare's resource rates. Add $0.144/hour multiplied by average utilization across both vCPUs. Both vCPUs count, so one elapsed hour at 20% utilization uses 0.4 active vCPU-hours.
Cloudflare cannot match a 2-vCPU, 4-GiB machine exactly: custom instances require at least 3 GiB per vCPU. Our examples therefore use 6 GiB. A named standard-3 also has 2 vCPU, but with 8 GiB memory and 16 GB disk. Cloudflare's instance constraints specify these allocations, checked November 9, 2026.
Your invoice also depends on Workers, Durable Objects, traffic and retained data. The $5 subscription is charged once per account. Existing account usage may already have consumed the included quantities.
Which Cloudflare Sandbox billing meters apply?
Cloudflare bills container resources and orchestration separately. These USD rates were checked November 9, 2026, against Cloudflare Containers pricing, Workers pricing and Durable Objects pricing.
| Meter | Included monthly quantity | Additional rate |
|---|---|---|
| Workers Paid subscription | Account access and separate allowances | $5/month minimum |
| Container active CPU | 375 vCPU-minutes | $0.000020/vCPU-second |
| Provisioned memory | 25 GiB-hours | $0.0000025/GiB-second |
| Provisioned running disk | 200 GB-hours | $0.00000007/GB-second |
| Worker requests | 10 million | $0.30/million |
| Worker CPU | 30 million milliseconds | $0.02/million milliseconds |
| Durable Object requests | 1 million | $0.15/million |
| Durable Object duration | 400,000 GB-seconds | $12.50/million GB-seconds |
| Container egress, North America/Europe | 1 TB | $0.025/GB |
| Container egress, Oceania/Korea/Taiwan | 500 GB | $0.05/GB |
| Container egress, other regions | 500 GB | $0.04/GB |
Cloudflare Containers pricing specifies 10-millisecond metering intervals. Cloudflare Durable Objects pricing rounds excess usage up to the next billable unit; a small excess in duration can therefore produce a full million-GB-second charge. The controller is allocated 128 MB for duration accounting, even when its actual memory use is lower.
Durable Object storage, R2 buckets, Workers Logs and model tokens are billed separately. The running-disk rate covers the disk only while the instance runs. Its files end with the instance unless you save a snapshot or copy them to a bucket, and a snapshot expires 30 days after it is created or last restored. Sandbox lifetime, checked November 9, 2026.
What does each instance type cost per hour?
According to Cloudflare’s instance limits, predefined instances range from 0.0625 to 4 vCPU. These calculated running-resource rates use Cloudflare Containers pricing and exclude subscription, allowances, controller services and network. The middle column assumes 20% average utilization across allocated vCPUs; the final column assumes full utilization.
| Instance: vCPU / GiB RAM / GB disk | 20% CPU, $/hour | 100% CPU, $/hour |
|---|---|---|
| lite: 0.0625 / 0.25 / 2 | 0.003654 | 0.007254 |
| basic: 0.25 / 1 / 4 | 0.013608 | 0.028008 |
| standard-1: 0.5 / 4 / 8 | 0.045216 | 0.074016 |
| standard-2: 1 / 6 / 12 | 0.071424 | 0.129024 |
| standard-3: 2 / 8 / 16 | 0.104832 | 0.220032 |
| standard-4: 4 / 12 / 20 | 0.170640 | 0.401040 |
| Custom reference: 2 / 6 / 5 | 0.084060 | 0.199260 |
Instance specifications: Cloudflare instance types, checked November 9, 2026. Calculations convert the documented per-second resource rates to hours.
A small command runner may fit lite or basic. A repository build that needs two CPUs cannot use those prices as its comparison. For the custom reference, the calculation is 2 × 0.20 × 0.072 + 6 × 0.009 + 5 × 0.000252. GB and GiB are preserved as each vendor publishes them.
What do three agent workloads cost per month?
Lizard's three modeled workloads require roughly two vCPUs and four GB of memory. We reuse the schedules from our three-workload sandbox comparison, with Cloudflare's larger minimum memory allocation. The figures are calculated from fixed durations. We did not run these workloads.
Inputs
| Workload | Runs and duration | Sandbox-hours | Peak concurrency |
|---|---|---|---|
| Prototype | 120 jobs × 5 minutes | 10 | 2 |
| Job queue | 10,000 jobs × 5 minutes | 833.333… | 20 |
| Workspaces | 50 × 8 hours/day × 22 days | 8,800 | 50 |
All assume 20% CPU utilization, a custom 2-vCPU/6-GiB/5-GB instance, Workers Paid and North America/Europe traffic. Job-queue starts are spread across 30 days. Workspaces start each working day: 1,100 starts. Outputs are exported before shutdown.
For a reproducible controller budget, assume one Worker invocation and one Durable Object request per run, 10 milliseconds of Worker CPU per invocation, and a Durable Object held active throughout each billed session. Cloudflare does not require this design; we chose it to make the controller cost visible. Assume zero billable retention, no storage operations, no paid logging, and no egress beyond the account allowance. All included quantities are unused elsewhere and applied once per scenario. Taxes and model tokens are excluded.
Results
| Monthly component | Prototype | Job queue | Workspaces |
|---|---|---|---|
| Workers Paid | $5.00 | $5.00 | $5.00 |
| Container CPU after allowance | $0.00 | $23.55 | $252.99 |
| Memory after allowance | $0.315 | $44.775 | $474.975 |
| Disk after allowance | $0.00 | $0.9996 | $11.0376 |
| Worker requests and CPU | $0.00 | $0.00 | $0.00 |
| Durable Object requests | $0.00 | $0.00 | $0.00 |
| Durable Object duration | $0.00 | $0.00 | $50.00 |
| Egress within allowance | $0.00 | $0.00 | $0.00 |
| Total, rounded once | $5.32 | $74.32 | $794.00 |
For the job queue, 833.333… sandbox-hours produce 333.333… active CPU-hours, 5,000 GiB-hours of memory and 4,166.666… GB-hours of disk:
CPU = (333.333… - 6.25) × 0.072 = 23.55
Memory = (5000 - 25) × 0.009 = 44.775
Disk = (4166.666… - 200) × 0.000252 = 0.9996
Total = 5 + 23.55 + 44.775 + 0.9996 = 74.3246 USDThe job queue's modeled Durable Object duration is 833.333… × 3,600 × 0.128 = 384,000 GB-seconds, below the separate allowance. For workspaces, duration reaches 4,055,040 GB-seconds. Subtract 400,000, round the remainder up to four million, then multiply by $12.50: $50.
The linked three-workload comparison's $74.32 job-queue estimate holds under these assumptions. Its $744.00 workspace subtotal becomes $794.00 with this controller model. An architecture that lets controllers hibernate can change that result; extra controller residency can increase it.
Choosing named standard-3 instead raises the job-queue container-and-plan subtotal to $91.63, before any additional controller charges. The CPU charge stays the same. The extra cost comes from 2 GiB more memory and 11 GB more disk per instance.
What changed with Sandbox SDK 1.0?
Sandbox SDK 1.0 moves orchestration into your Durable Object class. It has no separate sandbox price: you pay the Containers, Workers and Durable Objects rates above. Cloudflare's 1.0 migration guide, checked November 9, 2026, says the class calls this.ctx.container directly; the package retains helpers such as Files.
Your Durable Object code now owns lifetime and retries. Your code sets inactivity behavior and decides whether another attempt is safe. A cancelled command may already have changed files. Repeating it can consume more CPU and create incorrect output.
Old examples using getSandbox and the exported Sandbox class belong to 0.x. The 1.0 documentation also makes image dependencies explicit: your image must contain the tools your commands need. Moving from 0.x is engineering work; the resource rates did not change.
How do idle time, concurrency and cold starts affect cost?
An idle Cloudflare instance still incurs memory and disk charges until it stops. According to Cloudflare’s Sandbox lifetime documentation, the Durable Object stays active while it handles a request, runs an alarm, streams a response or holds a WebSocket it accepted. An open browser terminal can therefore keep the instance running. An inactivity timeout can be set up to six hours; it must be restored when the Durable Object restarts. Lifetime documentation, checked November 9, 2026.
Work inside the instance does not count as activity. If no requests arrive, the instance stops when the timeout ends, even in the middle of a build. Cloudflare's fix is a Durable Object alarm that runs more often than the timeout, and each alarm invocation is a billed Durable Object request. A pending monitor() call keeps the Durable Object in memory for up to 15 minutes, which adds duration. Record instance time and Durable Object time separately, because they can differ.
An extra idle minute after every job in the 10,000-job workload adds 166.667 sandbox-hours. At the custom reference's memory-and-disk floor, that adds $9.21 before any extra controller or CPU work. In the same scenario, Worker and Durable Object request charges are $0.
Default account caps are 1,500 concurrent vCPU, 6 TiB memory and 30 TB disk. Fifty custom reference workspaces require 100 vCPU, 300 GiB memory and 250 GB disk, within those published resource caps. Other account workloads share the limits. Cloudflare limits, checked November 9, 2026.
Cold starts also affect cost per completed task. Count billable startup and dependency installation in your duration measurements. A restored filesystem does not imply resumed processes. Benchmark your own repository before assuming equal job durations across providers.
How do Cloudflare Sandbox, Lizard Sandboxes and Vercel Sandbox compare on cost?
In Lizard's cost model, Cloudflare costs $5.32 for the prototype versus $19 on Lizard; Lizard costs less for the two larger schedules. This comparison uses the same task schedule and 20% CPU assumption, with each provider's stated resource accounting. It says nothing about speed: we did not benchmark the three platforms.
| Provider | Reference allocation | Prototype | Job queue | Workspaces |
|---|---|---|---|---|
| Cloudflare Workers Paid | Custom 2 vCPU / 6 GiB / 5 GB | $5.32 | $74.32 | $794.00 |
| Lizard Pro / Pro 5x | Small, 2 vCPU / 4 GB / 20 GB | $19.00 | $19.00 | $142.56 |
| Vercel Pro, iad1 | 2 vCPU / 4 GB | $20.00 | $113.34 | $1,196.80 |
The disk column is not matched: the Cloudflare reference keeps the 5 GB disk it was first sized to, while a Lizard Small sandbox has 20 GB.
Lizard usage is sandbox-hours × $0.0162. Pro costs $19 a month and includes $19 of usage, so the prototype ($0.16 of usage) and the job queue ($13.50) each cost $19. After the first payment, Pro runs up to 40 vCPU at once, or 20 Small sandboxes. The trial allows 1 Small and 2 Mini concurrently, deletes each within 1 hour of starting, and includes 50 Small starts total. Fifty workspaces need 100 vCPU, so they need Pro 5x: $99 a month with $99 of usage included. Their $142.56 of usage makes the bill $142.56. Lizard pricing and limits, checked November 11, 2026.
Vercel's iad1 rates are $0.128 per active vCPU-hour and $0.0212 per provisioned GB-hour, plus $0.60 per million creations. The comparison assumes one Pro deploying seat and its unused $20 included usage. Sandbox pricing and Pro billing, checked November 9, 2026. Retained storage and billable transfer are excluded on every provider.
Cloudflare's active-CPU billing helps bursty work, but memory and disk set a floor. The custom 2-vCPU instance costs $0.05526/hour at zero CPU, above the $0.0162/hour of a Lizard Small sandbox, which has 4 GB of memory. Cloudflare can still cost less for a small monthly bill, a sub-vCPU instance such as lite, or a team that already runs its application on Workers.
Lizard Mini, open to every account, has 1 vCPU, 2 GB memory and 10 GB disk at $0.0081/hour, below basic at 20% and 100% CPU.
Lizard Sandboxes are also microVMs with their own kernel (Lizard uses Firecracker), so the difference in this comparison is billing. A running Lizard sandbox is billed while idle, like Cloudflare memory and disk; a paused one has no compute charge. Set the lifetime explicitly: CLI and SDK creation default to five minutes, so an eight-hour workspace needs --timeout 28800000 after the first payment. Pass -s small too: outside the trial the default size is Medium. After the first payment, a VM stops after at most 596 hours.
For other sizes and providers, use the sandbox pricing comparison. Vercel's meters are covered in the Vercel Sandbox pricing guide.
FAQ
Does Cloudflare Sandbox require Workers Paid? Yes. The published Containers offering requires Workers Paid, with a $5 monthly minimum and separate included resource quantities. The fee is shared across the account.
Is an idle Cloudflare sandbox billed? Yes, while its instance runs. CPU follows activity, but provisioned memory and disk continue to accrue charges until it stops.
Why is a two-vCPU sandbox not priced like two CPU-hours? CPU billing measures actual use across both CPUs. One elapsed hour at 20% average utilization consumes 0.4 active vCPU-hours; memory and disk still accrue for the whole hour.
Does SDK 1.0 remove Durable Object charges? No. Your Durable Object class manages the container directly, and its request, duration and storage accounting still needs a budget.
Can Cloudflare cost less than Lizard? Yes. The prototype costs an estimated $5.32 on Cloudflare and $19 on Lizard Pro. Existing subscriptions, remaining allowances and the smallest viable instance can change that comparison.
Build with AI. Ship with Lizard.
You don't need a platform team to go live. Your whole cloud, one CLI command away.
- Services
- —
- Add-ons
- —
- Deployments
- —
- Sandbox starts
- —