WebGPU vs WASM: How On-Device AI Actually Works in 2026
A plain-English tour of the two browser technologies that make local AI possible: WebAssembly for portable compute, WebGPU for GPU acceleration — what each does, when they fall back, and what to expect on your device.
“Runs entirely in your browser” is easy to print on a landing page and hard to believe. A browser tab is supposed to be a sandboxed, battery-friendly environment — how is it transcribing audio, upscaling photos, and generating speech in there? Two standards do the heavy lifting: WebAssembly (WASM) and WebGPU. This is the non-academic version of how they work and where the limits are.
WebAssembly: near-native speed without the plugin
WebAssembly is a compact binary instruction format that browsers execute in a sandboxed virtual machine. It is not a language you write directly — compilers turn C, C++, Rust, and increasingly anything else into .wasm modules. That means battle-tested native libraries can be recompiled for the web instead of rewritten:
- Image codecs — MozJPEG, libwebp, libavif, and oxipng run in WASM, which is how browser image compressors hit desktop-grade file sizes.
- OCR — Tesseract’s recognition engine compiles to WASM and runs entirely offline.
- Audio DSP — noise suppression (RNNoise) and codec work run as SIMD-accelerated WASM.
- PDF and document parsing — pdf.js renders and extracts text from PDFs without any server.
Modern WASM supports SIMD (single-instruction, multiple-data) instructions and threads via shared memory, closing the historical performance gap to roughly 1.5–2× slower than native for most compute. That is a remarkable number: you lose some speed and gain zero install, zero update friction, and instant cross-platform support.
WebGPU: giving the browser real GPU access
AI models are dominated by matrix multiplication, which GPUs excel at. WebGPU is the first web standard designed from the ground up for general GPU compute — not just drawing pixels. It exposes modern GPU APIs (Vulkan, Metal, DirectX 12 underneath) with a JavaScript-friendly interface.
For AI, this matters enormously. Transformers.js running an embedding model on CPU might process a PDF at a few tokens per second; on WebGPU the same model runs 5–20× faster, often with lower energy use because the GPU does the work in dedicated silicon. Whisper transcription, embeddings for semantic search, super-resolution models, and neural TTS all take this path when available.
What happens on your machine, step by step
- First visit: the tool fetches model files (usually quantized to 8-bit or smaller, in ONNX or similar formats) and any WASM modules. Your browser caches them like other static assets.
- Capability check: the tool probes for WebGPU. Chrome and Edge ship it on desktop and Android; Safari and Firefox support varies by version. If unavailable, it falls back to WASM automatically.
- Processing: your file is decoded locally, converted to tensors, run through the model on GPU or CPU, and converted back — all in memory on your device.
- Result: you download or copy the output. Nothing has been uploaded.
The fallback ladder, and why it matters
Well-built local tools implement a performance ladder: WebGPU first, then threaded WASM with SIMD, then single-threaded WASM. The same feature works everywhere; only speed changes. In practice:
- Chrome/Edge 113+ on a Mac or PC with a discrete GPU: full speed.
- Safari/Firefox or older hardware: functional, noticeably slower for large models.
- Mobile: usable on recent devices for small models; large files test the limits of mobile RAM.
Why models can be small enough for this
The AI wave that makes browser tools practical is quantization: shrinking model weights from 16-bit floats to 8-bit integers (or lower) with small accuracy loss. A 150 MB speech model might be 460 MB at full precision — the quantized download fits in a browser cache budget. Specialized small models (Whisper tiny/base, MiniLM, Kokoro, quantized super-resolution nets) beat huge general-purpose models on their narrow task per megabyte, which is exactly what a browser needs.
The bottom line
WebAssembly brought the world’s native libraries to the browser; WebGPU brought modern GPU compute. Together they cover the two workloads that mattered least to the web of the 2010s and matter most now: media processing and AI. The platform you already have open — the browser — has quietly become a capable, sandboxed AI runtime. The tools on this site are built on exactly that assumption, and the network tab proves it: load once, process locally, upload nothing.
Try the tools
Everything described here runs for free in your browser — no sign-up, no uploads. Explore the full matrix of on-device AI tools from the homepage, or read the end-to-end workflows.
Back to the matrix