Skip to content

Introduction

WebContainers are a browser-based runtime for executing Node.js applications and operating system commands, entirely inside your browser tab. Apps that previously required cloud VMs to execute user code, in WebContainers can run entirely client-side with a number of benefits over the legacy cloud VM.

WebContainer API is perfect for interactive coding experiences. Among its most common use cases are production-grade IDEs, programming tutorials, next-generation documentation, AI applications, or employee onboarding platforms. WebContainers have been battle-tested by millions of users of StackBlitz classic editor, Codeflow, the official SvelteKit tutorial, and Cloudflare Wrangler workers, among others.

Ready to try it? Check out this WebContainer API starter in an editor running on... WebContainers as well!

Open in StackBlitz

Key features

  • Native Node.js inside the browser running Node.js toolchains (for example, Webpack, Vite, and others)
  • Flexible: build next-generation coding experiences powered by WebContainers
  • Unmatched security: everything is contained in a browser tab
  • Fast: spinning up the entire dev environment in milliseconds
  • Always free for Open Source: you're the future of the web and we love you 💙

WebContainers versus cloud VM approach

WebContainers enables you to build applications that previously required running VMs in the cloud to execute user code. Instead, WebContainers run entirely client-side, providing a number of benefits over the legacy cloud VM approach:

  • Unmatched user experience. No latency. Faster than localhost. Works offline.
  • Cost effective. Compute is done locally. No paying by the minute for cloud VMs.
  • Scales to millions. Leverages modern CDN caching and client-side compute.
  • No risk of bad actors. Say goodbyte to bitcoin miners, malware, and phishing sites.

To explore the API, check out the WebContainer starter:

Open in StackBlitz

Who's using WebContainers?

Initially announced at Google I/O, WebContainers are developed by StackBlitz and have been battle-tested by millions of developers every month in StackBlitz classic editor and in the new Codeflow IDE. Externally, WebContainers also power a number of instant coding experiences such as Cloudflare Wrangler's workers.new and the Svelte team's interactive fullstack tutorial for SvelteKit.

To see more examples of how WebContainers have been used so far, check out our Community Projects page.

Get started

To get started:

Community

Wanna ask a question, get some inspiration, or help us amplify your project? Join our Discord community!