CompareHead to head
E2B vs Modal
E2B: Firecracker microVMs and templates for agent code, sold per running second. Modal: gVisor containers by default with a five-minute lifetime, no pause at all, and a CPU unit that may be one or two vCPUs depending on which reading you trust.
Short answer: E2B is the cheaper fit for 1 of 9 common workloads and Modal for 2; for the rest neither runs it as described or they cost the same. E2B offers 36 of 78 checked capabilities without a catch, Modal 36; they differ on 39. Prices checked 29 October 2026.
What each costs
Monthly machine cost at list prices, before any AI model. A catch means it cannot run the workload exactly as described.
| Workload | E2B | Modal |
|---|---|---|
| A personal agent that stays on (Hermes, OpenClaw) | $270.89 on Pro Catch: Sessions end after 24 hours, so an always-on machine has to be restarted by your own code. | $143.71 on Starter Catch: Sessions end after 24 hours, so an always-on machine has to be restarted by your own code. Modal sandboxes have no stopped state; keeping files needs a Volume or a snapshot. |
| A coding agent for one developer | $202.99 on Pro Catch: 40 GiB of disk is over the 20 GiB limit. | $46.15 on Starter Catch: Modal sandboxes have no stopped state; keeping files needs a Volume or a snapshot. |
| A code interpreter inside your product | $55.20 on Hobby | $49.32 on Starter |
| A browser agent for a small team | $828.00 on Hobby | $1,159.80 on Starter |
| Self-hosted n8n for a small team | $270.89 on Pro Catch: Sessions end after 24 hours, so an always-on machine has to be restarted by your own code. | $143.71 on Starter Catch: Sessions end after 24 hours, so an always-on machine has to be restarted by your own code. Modal sandboxes have no stopped state; keeping files needs a Volume or a snapshot. |
| A Discord or Slack bot for one server | $60.44 on Hobby Catch: Sessions end after 1 hour, so an always-on machine has to be restarted by your own code. | $56.86 on Starter Catch: Sessions end after 24 hours, so an always-on machine has to be restarted by your own code. Modal sandboxes have no stopped state; keeping files needs a Volume or a snapshot. |
| Claude Code for a team of five | $414.96 on Pro Catch: 40 GiB of disk is over the 20 GiB limit. | $350.74 on Starter Catch: Modal sandboxes have no stopped state; keeping files needs a Volume or a snapshot. |
| A scraper that runs four times a day | $1.66 on Hobby | $0.00 on Starter |
| Your own remote MCP server | $48.62 on Hobby Catch: Sessions end after 1 hour, so an always-on machine has to be restarted by your own code. | $39.33 on Starter Catch: Sessions end after 24 hours, so an always-on machine has to be restarted by your own code. Modal sandboxes have no stopped state; keeping files needs a Volume or a snapshot. |
Feature by feature
The figure that decides each feature, from each provider's own pages.
| Feature | E2B | Modal |
|---|---|---|
| Isolation | Yes Firecracker; non-root user | Partly gVisor; VM on request |
| Sizes and regions | Partly 8 vCPU / 8 GiB; no GPU | Partly No fixed sizes; 1 core = 2 vCPU |
| Lifecycle | Partly RAM + disk | No No pause; terminate |
| Snapshots and forks | Yes RAM + disk; 20 forks | Partly Filesystem 30 d; memory 7 d |
| Storage | Partly 10–20 GiB; volumes in beta | Partly 512 GiB; billed as memory |
| Idle and waking | Partly 5 min, then killed | Partly 5 min lifetime; no idle |
| Reaching it | Partly No auth | Yes Connect token |
| Custom domains | Partly Own proxy in front | Yes Team+, manual |
| Outbound network | Yes No rate; no static IP | Yes $0.04/GiB |
| Keys and secrets | Yes No, proxy | Partly Env vars, or beta proxy |
| Ways to drive it | Yes No; SDK | Partly No; SDK |
| Built-in agents | Partly None preinstalled; guides | No None; SDK |
| Teams and accounts | Partly Per-project limit | Partly Environment budgets |
| Billing models | Partly $0.000014/vCPU-s | Partly $0.141912/core-hour |
| Trials and free tiers | Yes $100 one-off | Partly $30/month credits |
| The company | Partly FoundryLabs, Inc.; SOC 2 II | Partly Modal Labs, Inc.; no public SLA |
Where they differ
The 39 capabilities where one does something the other does not, or does it with a catch.
| Capability | E2B | Modal |
|---|---|---|
| Its own virtual machine | Yes | With a catch The default is a gVisor container, which is not a computer of its own; a true virtual machine with its own kernel is a separate runtime you have to ask for. |
| Docker inside | Yes | With a catch Docker needs the VM runtime; the default gVisor sandbox cannot run it. |
| Nested virtualisation | Not published | With a catch Nested virtual machines are an Enterprise-plan option that must be switched on when the sandbox is created. |
| Any size you like | With a catch You can choose cores and memory, but only up to 8 of each; more needs a conversation with support. | Yes |
| Large machines | No The ceiling is 8 cores and 8 GB of memory, so a 32 GB machine cannot be bought. | Yes |
| GPUs | No There is no graphics processor option in any plan, tool or template. | Yes |
| Choose the region | With a catch Four regions exist, but outside the United States you have to contact support to be switched on. | Yes |
| Pause keeps memory | Yes | No |
| Pre-started pools | No | With a catch You have to build and run the pool yourself; there is no setting that keeps machines waiting. |
| Starts in under a second | Not published | Yes |
| Snapshots with memory | Yes | With a catch Memory snapshots are still labelled experimental and are deleted after seven days, which cannot be extended. |
| Copy a running machine | Yes The source pauses while it is copied and its open connections drop. | No |
| Separate volumes | With a catch Volumes exist but are in private beta and need access from support. | Yes |
| One volume, several machines | With a catch One volume can serve several sandboxes, but volumes are in private beta. | Yes Two machines writing the same file means the last write wins. |
| Mount outside storage | With a catch Mounting a bucket needs a custom template with the right filesystem tool installed; it is not built in. | Yes |
| Large disk | No The largest included disk is 20 GiB, short of 100 GB. | Yes |
| Wakes on a request | Yes | No |
| Scheduled runs | No | Yes |
| Public link to a port | Yes | With a catch A normal web port needs a connect token; only a port exposed as raw traffic is open to anyone. |
| Private link | No There is no built-in lock: anyone who has the link can open it. | Yes |
| Non-web ports | Not published | Yes |
| Automatic HTTPS | No The certificate is obtained by the server you run in front of the machine, not by the provider. | With a catch Certificates come with the domain, but only on Team and Enterprise plans and after a manual setup step. |
| Outbound data included | Not published | Yes |
| Fixed outgoing IP | No There is no dedicated or fixed outbound address on any plan, including Enterprise. | With a catch Only Team and Enterprise plans get it, and each account can create one or three gateways holding up to five addresses each. |
| Secrets the agent cannot read | Yes | With a catch The feature that hides keys is in beta and cannot be changed once set up. |
| Documented HTTP API | Yes | No The documented interface is the SDK and its gRPC connection; there is no separate HTTP API to call. |
| MCP server | With a catch E2B's MCP support runs other companies' tools inside a sandbox; nothing of E2B's lets your assistant create sandboxes. | No The only MCP guidance is how to deploy someone else's MCP server inside Modal. |
| Coding agents preinstalled | With a catch A prebuilt Hermes template exists, but the default image has no agent and there is no Claude Code or Codex template. | No Nothing is preinstalled and there is no agent API; the agent is code you run. |
| One-click Hermes | With a catch A prebuilt template is ready, but you still create the sandbox with a command and pay by usage. | No Hermes lists Modal as a terminal backend, not as a one-click host. |
| Browser built in | With a catch A browser comes with the desktop image or through Kernel cloud browsers, not in the default sandbox image. | No No browser, desktop or computer-use API is documented; the sandbox is a headless container. |
| Desktop for computer use | Yes | No No desktop, VNC or computer-use API is documented. |
| Roles and permissions | Not published | With a catch Role-based access starts on the Team plan; the free-to-start Starter plan has no roles. |
| Single sign-on | Not published | With a catch Okta SSO is listed with audit logs and HIPAA on the Enterprise plan. |
| Audit log | Not published | With a catch Audit logs are listed with SSO and HIPAA on the Enterprise plan. |
| Paused costs only storage | Yes | No There is no pause: a sandbox bills until it is shut down, and its saved copy is stored separately. |
| Ongoing free tier | No The $100 is a one-time credit, not a monthly allowance. | With a catch Thirty dollars of free compute returns each month, but a payment method must be on file before anything runs. |
| Try without a card | Yes | No A payment method must be on file before you can use Modal at all. |
| Uptime promise (SLA) | With a catch Uptime and support terms are set in the Enterprise agreement; Hobby and Pro have no public numeric SLA. | No There is no public SLA; one is attached to the order only if you bought a plan that includes it. |
| Open source or self-hostable | Yes | No The client libraries are open source; the platform is not. |
Which to pick
Our reading of the sourced material, not a provider claim.
Pick E2B for
- A microVM with its own kernel, Docker, snapshots that keep memory, and up to 20 forks from a running sandbox.
- An agent that needs a real API and SDKs, plus templates built from any Docker image.
- A team that needs a SOC 2 report and a HIPAA path without an enterprise contract.
Avoid it for
- A long-running agent: the default timeout kills the sandbox after five minutes and commands do not reset it.
- Memory above 8 GiB, or any GPU workload.
- A client-facing link that must be private: public URLs have no authentication by default.
Pick Modal for
- High-volume, short-lived code execution: Sandboxes start in about a second and the platform claims over 10,000 creates a second.
- A GPU sandbox for inference or training-adjacent work: up to 8 GPUs per container, priced per GPU-second.
- A team already on Modal: sandboxes share the workspace, Images, Volumes and billing with Functions.
- Splitting trust with sidecars: up to 250 extra containers per sandbox for a proxy or credentials.
Avoid it for
- An agent that needs to pause and resume: there is no paused state, and a memory snapshot terminates the source.
- An always-on box: the lifetime cap is 24 hours and a running idle sandbox bills its full request.
- A cheap always-on dev box: $347 a month documented, $555 on the measured CPU reading.
- A client-facing URL: inbound is closed by default and there is no built-in desktop or browser.
Want a third provider in the picture? Use side by side, or price your own numbers in the cost calculator.