Can you run AI in the browser, without a server? What already works today
What WebGPU is, which AI already runs in the browser without a server, and its download and memory limits.
By Michel Davi 7 min read
- technology
- kastavo

When you use an AI assistant on a website, your text usually travels to a server with server-grade graphics cards, gets processed there, and the answer comes back. For smaller tasks, that is changing: today you can already download a model and run it on your own device, inside the browser. This text explains how that is possible, what already works and what it costs.
What changed: the browser got access to the graphics card
Running an AI model takes a lot of parallel calculation, and the graphics card (GPU) is good at exactly that. For years, the browser only used the GPU to draw graphics. WebGPU is the technology that opens that access for general calculations. In November 2025, an announcement on web.dev, the Chrome team's content site for developers, reported that it is officially supported in Chrome, Edge, Firefox and Safari.
"Supported" comes with caveats. In that announcement, Firefox had started with Windows and macOS on ARM chips, and support for Linux, Android and Intel-based Macs was still in progress. In Chrome and Edge, Linux was in progress too. Safari has WebGPU in version 26 of Apple's systems. That picture may have changed since then.
When a device has no WebGPU, you can still run small models on the CPU with WebAssembly (the subject of our text on how WebAssembly runs games and apps), just without the graphics card's acceleration.
Three ways to run AI in the browser
- Small-model libraries, such as Transformers.js. Hugging Face's library runs models directly in the browser, with no server. By default it uses the CPU, through WebAssembly, and it uses the GPU when you ask for WebGPU. It handles text, image and audio tasks, such as classifying texts or transcribing speech.
- Chat engines, such as WebLLM. It runs language models (the "chats") with WebGPU, and its interface is compatible with OpenAI's. Its authors state, in a paper, that it can retain up to 80% of native performance on the same device.
- AI built into the browser. Chrome has AI APIs that use a model of its own, Gemini Nano. The site does not need to load the model: the browser downloads it by itself, the first time a page uses it. In exchange, the requirements are heavy (see the section on the price).

What you can do today
Small, well-defined tasks: classifying short texts, transcribing audio, recognizing text in images, comparing the meaning of sentences and, with small models, simple conversations. The bigger and more open-ended the task, the more likely an online service with a large model is the better choice.
The price of running on your device
- Download and memory: the model has to be downloaded, and that happens the first time. In WebLLM's list, Llama 3.2 1B, the smallest of the Llama 3 series, declares about 0.9 GB of GPU memory, and larger models ask for much more. That number comes from the library's configuration file and changes with each version.
- Devices and languages: Chrome's built-in AI does not run on phones, asks for a GPU with more than 4 GB of memory (or a CPU with 16 GB of RAM and 4 cores) and at least 22 GB of free disk space (the documentation itself says the model is much smaller than that). The languages the documentation lists are English, Spanish, Japanese, German and French, from Chrome 149. Portuguese is not on the list.
- Quality: models small enough to fit in the browser tend to do less than the large ones in online services.
- Connection: the first use needs the internet to download the model. After that, the file is usually kept in the browser's storage, but that storage can be cleared when space runs short.
Privacy: what changes and what does not
Running on the device means your text or file does not need to leave it. But there are three things to watch:
- The model comes from somewhere. By default, Transformers.js downloads models from Hugging Face, a third party, and the WebAssembly files from a CDN. Those requests do not carry your text, but they reveal your IP, like any access. You can host the models and those files on your own site.
- The site still decides what it does with your data. The same JavaScript that runs the model could send the text to a server. It is the same reasoning as in the WebAssembly text: privacy comes from how the site was built, and you can check it in the browser's Network tab.
- Model and code come from third parties. The same reasoning as in our text on supply chain attacks applies here: pinning the model version and checking where it comes from reduces the risk. For example, if you do not specify a revision, Transformers.js uses the model's "main" version, which can change.
And Kastavo?
The closest example on Kastavo is the Extract Text from Image (OCR) tool. The recognition runs in the browser, with Tesseract, and the image does not leave the device. The engine comes from the site itself, and the language model is downloaded from jsDelivr, a third-party CDN, the first time you use that language, which is explained in the Privacy Policy. Since version 4, Tesseract has had a recognition engine based on a neural network (LSTM), and that is the one the tool uses. To understand this architecture in general, see Why Kastavo has no server.
The lesson that remains
Running AI in the browser is no longer a demo: it already works for small tasks, on recent devices, without a server. But it is not free: it costs download, memory and quality, and it does not work on every device. And the useful question stays the same as ever: not just "does this run in the browser?" but "what happens to my file while it runs?"
Frequently asked questions
Yes, for small tasks and smaller models. Libraries such as Transformers.js and WebLLM download the model to the browser and run it on the device, using the GPU when WebGPU is available or the CPU, without the graphics card's acceleration.
It is the technology that lets the browser use the graphics card for general calculations, not just for graphics. It is already supported in Chrome, Edge, Firefox and Safari, but with differences by operating system.
On first use, yes: the model has to be downloaded. After that, working without the internet depends on the browser keeping the file stored and on the site being prepared for it, so it is not a guarantee.
With a model running locally, the text or file does not need to leave. But the site that runs the model still decides what to do with the data, and downloading the model is a network request. To check, use the browser's Network tab.


