Cloudflare Sandboxes review
Cloud execution for untrusted code with persistence, streaming and network controls.
Reviewed by iTechGuides Editors · Editorial team · Updated Nov 2026
Cloudflare Sandboxes provides isolated environments for running untrusted or AI-generated code, aimed at AI agents and developer tools that need controlled execution. Sandboxes run as Cloudflare Containers with configurable Linux images, runtimes, filesystems and processes. Workers manage container lifecycles through the @cloudflare/sandbox SDK, while repository cloning, shell commands, file operations and directory management support practical development workflows. Python and JavaScript interpreters can return rich outputs, and real-time stdout and stderr streaming exposes execution progress.
Pricing is usage-based through the underlying Cloudflare Containers platform. The published meters are Memory usage for container memory, CPU usage for container CPU, Disk usage for container disk, and Network egress for outbound transfer. Network egress is listed at $0.025 per GB for NA/EU traffic. The product page describes free usage allowances and rates after those allowances, while the documentation states that Sandboxes are available on the Workers Paid plan. This model suits workloads that can track resource consumption, but it requires budgeting across several independent usage dimensions rather than selecting a single flat package.
The strongest technical fit is for agents that need persistence and controlled connectivity: snapshots and mounted storage preserve state, while Workers control outbound access and integrations through network controls and interception. Containers run in Firecracker microVMs with separate kernels and networks, adding isolation for untrusted workloads. Choose Cloudflare Sandboxes when your stack already centers on Workers and you need multi-language execution, streaming output and filesystem persistence in the cloud. Consider another option if you need a browser sandbox, broader integrations beyond the Workers SDK, or support channels beyond documentation.
Cloudflare Sandboxes pros and cons
- Where it wins
- Isolated containers support custom Linux images and dependencies
- Snapshots and mounted storage provide persistent working state
- Streaming, interpreters and network interception support agent workflows
- Where it doesn't
- Usage-based charges span memory, CPU, disk and network egress
- Availability is tied to the Cloudflare Workers Paid plan
- Integrations center on Workers SDK, with documentation as the support channel
Cloudflare Sandboxes fact sheet, pricing and score →
Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.
Last updated · How we research and update