Free HTML to APK
← All articles AI · Offline

Running AI on the phone itself: what works in an HTML app

Small AI models can run inside your app with no server and no internet. Here is what is realistic today, and what still needs the cloud.

7 October 2026 · 2 min read

Most AI features you see in apps send your data to a server and wait for an answer. But a growing number of models are small enough to run on the phone itself. For an HTML app, that means AI features that work offline, cost nothing per use and keep data on the device.

How it works

Libraries such as Transformers.js and ONNX Runtime Web run models in the browser engine using WebAssembly. WebAssembly is supported in the Android System WebView that powers apps built with Free HTML to APK, so the same code that runs in Chrome on your laptop can run inside your app.

Faster GPU acceleration through WebGPU is arriving, but support in Android WebView is still uneven across devices. Plan for WebAssembly and treat GPU speed as a bonus.

What runs well on a phone today

  • Text classification, like sentiment or spam detection. Small models, fast answers.
  • Embeddings and semantic search over your app's own content, for "find notes about…" style search.
  • Image classification and simple object detection on photos the user picks.
  • Speech to text with compact models, for short clips.
  • Translation between a few language pairs with small dedicated models.

What still belongs in the cloud

Large chat models that write long answers are still too big and too slow for most phones. For a general assistant, use a server with a proper proxy, as explained in our chatbot guide.

Practical tips

  • Model size is app size. A model bundled in your app makes the APK bigger. Models from tens of megabytes are fine. Hundreds of megabytes are not, for most users.
  • Download on first use if the model is large, and cache it, rather than bundling it. Tell the user how big the download is.
  • Run it in a Web Worker so the interface stays smooth while the model thinks.
  • Test on a cheap phone. A flagship hides problems that a budget device will show immediately.

Why bother

On-device AI is private by design, because nothing leaves the phone. It works on a plane. And it has no per-request cost, which matters a lot if your app becomes popular. For many small features, that combination beats a cloud API.

Try it yourself. Free HTML to APK turns your HTML into a signed Android app right on your phone. Free, no account, no watermark.