WebGPU
A modern web API for high-performance GPU compute and graphics
WebGPU is a modern web API that exposes low-level, high-performance access to a device's GPU for both rendering and general-purpose compute directly from JavaScript, designed as the successor to WebGL and modeled on modern native graphics…
Definition
WebGPU is a modern web API that exposes low-level, high-performance access to a device's GPU for both rendering and general-purpose compute directly from JavaScript, designed as the successor to WebGL and modeled on modern native graphics APIs like Vulkan, Direct3D 12, and Metal.
Overview
WebGPU was developed by the W3C GPU for the Web Community Group to address limitations that had become increasingly apparent in WebGL, which is based on the aging OpenGL ES 2.0/3.0 model. Modern native graphics APIs — Vulkan, Direct3D 12, and Metal — expose the GPU with far more explicit control over memory, command submission, and parallelism than OpenGL's model allows, and WebGPU translates these lower-level abstractions into a portable, browser-safe API. Unlike WebGL, which is primarily a rendering API with limited compute capability (via fragment shader tricks), WebGPU treats general-purpose GPU compute as a first-class use case, alongside rendering. Programs are written in WGSL (WebGPU Shading Language), a new shader language designed specifically for the API, and compute or render pipelines are described explicitly via pipeline and bind-group objects, giving developers precise control over how data and shader stages are bound together — a departure from WebGL's more implicit, stateful API. WebGPU's explicit command-buffer model allows work to be recorded and submitted asynchronously, reducing CPU-side driver overhead and enabling better multi-threaded usage patterns than WebGL typically allows. This makes WebGPU particularly attractive for compute-heavy workloads in the browser: in-browser machine learning inference (e.g., running transformer models via TensorFlow.js or ONNX Runtime Web), physics simulation, procedural generation, and next-generation 3D rendering engines. WebGPU shipped in Chrome and Edge starting in 2023, with Firefox and Safari following with varying levels of support since. As of the mid-2020s it is increasingly the target for new browser-based graphics and ML-inference engines, while WebGL remains the safer choice where maximum cross-browser and legacy-device compatibility is required.
Specification
- Low-level access to GPU rendering and compute pipelines from the browser
- Modeled on modern native APIs: Vulkan, Direct3D 12, and Metal
- First-class general-purpose GPU compute support, not just rendering
- WGSL (WebGPU Shading Language) as its dedicated shader language
- Explicit command-buffer and pipeline model reducing driver overhead
- Better multi-threading support than WebGL's stateful API
- Designed to power browser-based ML inference and next-gen 3D engines
- Successor to WebGL, though not a drop-in replacement
Use Cases
Alternatives
History
WebGPU is the modern successor to WebGL, giving web applications lower-level, more efficient access to a device's GPU for both rendering and general-purpose compute. Rather than binding to OpenGL, it maps onto the platform's native modern graphics APIs — Vulkan, Metal, or Direct3D 12. The standard was incubated in the W3C's "GPU for the Web" Working Group starting in 2017, a collaboration among Apple, Google, Mozilla, Microsoft, and Intel. Google Chrome and Microsoft Edge first shipped WebGPU enabled by default in April 2023 (Chrome 113), with Safari and Firefox adding support in 2025. Because it exposes compute shaders, WebGPU has become important not only for high-performance graphics but also for running machine-learning workloads directly in the browser.
Sources
- Chrome for Developers — "Chrome ships WebGPU" · as of 2026-07-17
- W3C — WebGPU specification · as of 2026-07-17