Cloudflare Sandbox
6.6/10Cloudflare Sandbox runs untrusted or AI-generated code in isolated Linux containers or Dynamic Workers, controlled from Cloudflare Workers code, for developers building agents.
Data last updated November 2026 · Our methodology
Overview
Cloudflare Sandbox, delivered through the @cloudflare/sandbox SDK, gives a Worker isolated environments for running code it does not trust, such as code written by AI agents, user uploads, data analysis jobs, preview servers and build steps. It offers two environments. Containers are full Linux microVMs with their own kernel and network that run an image you supply. Dynamic Workers are lightweight isolates for JavaScript, Python or WebAssembly. A Durable Object starts each container sandbox and controls its lifecycle. The SDK covers streamed command execution, browser terminals over WebSocket, file transfer, mounting R2 or other S3-compatible buckets, directory backups to R2, snapshots (in beta), preview URLs on your own hostnames, and outbound proxying that keeps credentials inside the Worker. Containers and Sandboxes became generally available in April 2026, and SDK 1.0 shipped on September 30, 2026. Sandbox requires the Workers Paid plan at $5 per month. That plan includes 375 vCPU-minutes, 25 GiB-hours of memory and 200 GB-hours of disk each month. Usage beyond that is billed in 10 ms increments. CPU is charged only while active, but memory and disk are charged on the provisioned instance size. Workers, Durable Objects, logs and egress are billed on top. It suits teams whose agents already run on Cloudflare Workers. The main limitation is that orchestration is tied to Workers and TypeScript. Instances top out at 4 vCPU and 12 GiB with no GPUs, and the SDK is a poor fit for sandboxes that need to stay on around the clock.
Our Rating
AI Software6.6/10
Hosting & Infrastructure6.6/10
Who Cloudflare Sandbox is best for
Best software for DevelopersGood fit
It is an SDK used from Workers code to run agent-generated code.
Suits SaaS products that need to run user or agent code safely, with per-sandbox network controls.
Low $5 entry point and scale-to-zero billing keep early costs small.
Less suited
Runs on Cloudflare's large network, but one review notes Containers fall outside its SOC 2 Type II scope.
Pros & Cons
Pros
- CPU is billed only during active use, and sandboxes sleep when idle, so bursty agent workloads stay cheap.
- Two tiers under one vendor: full Linux container microVMs, and fast Dynamic Worker isolates for generated JavaScript or Python.
- An outbound Worker proxy injects credentials at the network layer, so agent code never sees the API tokens.
- Built-in PTY terminals, preview URLs, file watching, and R2 or S3 bucket mounting cover common coding-agent needs.
- Integrates directly with Workers, Durable Objects and R2 for teams already on Cloudflare.
Cons
- Orchestration must run in Cloudflare Workers, and the SDK is TypeScript only.
- Instances top out at 4 vCPU and 12 GiB of memory, and there are no GPUs.
- Memory and disk are billed on the provisioned size, which makes always-on sandboxes costly.
- Disk is lost when an instance ends unless you take a snapshot, and snapshots are still in beta.
- The SDK changed quickly: 0.x is superseded by 1.0, and 0.x apps need migrating before fixes end on 2026-12-31.
Key Features
Cloudflare Sandbox Pricing
Workers Paid (required)
- 375 vCPU-minutes per month included
- 200 GB-hours disk per month included
- 25 GiB-hours memory per month included
- Billed in 10 ms increments while running
- 1 TB egress included in North America and Europe
- Instance types from lite (1/16 vCPU, 256 MiB) to standard-4 (4 vCPU, 12 GiB, 20 GB disk)
Frequently Asked Questions
No. Sandbox requires the Workers Paid plan at $5 per month, and the Free plan has no Containers allowance.
Usage is billed in 10 ms increments. CPU costs $0.00002 per active vCPU-second, memory $0.0000025 per GiB-second and disk $0.00000007 per GB-second, after the included monthly allowances. Workers, Durable Objects, logs and egress are billed separately.
Yes. Containers and Sandboxes became generally available on April 13, 2026, and Sandbox SDK 1.0 was released on September 30, 2026. Snapshots are still in public beta.
Sandboxes sleep when idle and wake on new requests. Disk is lost when the instance ends unless you save a snapshot or back up directories to R2.
The largest instance type, standard-4, has 4 vCPU, 12 GiB of memory and 20 GB of disk. GPUs are not supported.
Yes. Network access can be set for each sandbox, and outbound requests pass through Worker code, which can block them or add credentials.
Similar Tools
See all alternatives
DigitalOcean is a developer-focused cloud platform offering Droplet VMs, managed Kubernetes, databases, object storage, App Platform and GPU compute for startups and small businesses.

Frontend cloud platform from the makers of Next.js that builds and deploys web apps from Git to a global CDN with serverless functions.

Luxembourg-based edge and cloud provider offering CDN, virtual machines, bare metal, managed Kubernetes, object storage, AI GPU cloud, and DDoS/WAF security for businesses.
Ranked near Cloudflare Sandbox in AI Software
See Cloudflare Sandbox in the listCloudflare Sandbox is #267 in AI Software by our score.





