Here is how to convert an HTML5 game to an Android app without rewriting it: you keep the game exactly as it is and put a thin native shell around it. The shell is an Android, iOS or desktop project whose only job is to show your game's index.html full screen, in a WebView or a browser engine, with an app icon and a store listing. The hard parts are choosing the right shell, making the game behave like an app instead of a web page, and getting through store review. Tool versions and store rules below were checked in October 2026.
This works for any HTML5 game built as static files. All 50 of our games are static builds with no backend, so the built output is exactly what goes into the wrapper. Before you wrap anything, make sure the game itself is phone-ready: our HTML5 mobile game development guide covers touch, orientation, audio and performance.
Which wrapper should you use?
| Route | Platforms | How the game loads | Best for | Watch out for |
|---|---|---|---|---|
| Trusted Web Activity (Bubblewrap) | Android | From your HTTPS site, rendered by Chrome | Games already online as a web app | Needs a manifest, Digital Asset Links and a live site |
| Capacitor 8 | Android, iOS | Files bundled in the app, system WebView | Offline games, iOS, native plugins | Needs Android Studio, and a Mac with Xcode for iOS |
| Apache Cordova | Android, iOS | Files bundled in the app, system WebView | Existing Cordova projects and plugins | Check each plugin is still maintained |
| Android Studio WebView | Android | Files bundled, served by WebViewAssetLoader | Full control with almost no dependencies | You write the native code yourself |
| Electron | Windows, macOS, Linux | Bundled Chromium plus Node.js | Steam and itch.io releases, same engine everywhere | Builds are much larger than the game |
| Tauri 2 | Windows, macOS, Linux, Android, iOS | The system webview on each OS | Small installers | Needs Rust; each OS renders with a different engine |
| NW.js | Windows, macOS, Linux | Bundled Chromium plus Node.js | Older desktop projects | Smaller community than Electron |
Our short recommendation: Capacitor if you want Android and iOS from one project, a Trusted Web Activity if the game already lives on your site and you only need Google Play, and Electron for Steam.
Prepare the HTML5 game before you wrap it
Most "my game works in Chrome but not in the app" problems come from the build, not the wrapper. Check these first:
- Relative paths. Asset URLs must work when the game isn't at the root of a domain. With Vite, set
base: "./"in the config so the builtindex.htmlreferences./assets/…. - Everything local. No assets loaded from a CDN, no fonts from a font service, nothing that fails offline. People play on planes and in tunnels.
- Touch, orientation and audio handled the way a phone needs (pointer events, a layout for the orientation you declare, audio resumed on the first tap).
- Saves in local storage, written often, because Android and iOS kill background apps without warning.
- The back button. On Android it should pause the game or go back a menu, not close the app mid-level.
- External links (credits, privacy policy) opened in the system browser, not inside the game's WebView.
- No browser-only UI. Remove "Add to Home Screen" prompts, fullscreen buttons and rotate-your-phone panels that make no sense in an app.
How to convert an HTML5 game to an APK or AAB
Google Play doesn't take APK files for new apps: since August 2021, new apps must be published as an Android App Bundle (AAB). You still build APKs to install and test on your own phone. All the tools below produce both.
Option 1: Trusted Web Activity with Bubblewrap
A Trusted Web Activity opens your hosted game in Chrome, full screen, with no browser bar. The app proves it belongs to your site through Digital Asset Links: a file at /.well-known/assetlinks.json on your domain lists the app's signing key. Google's Bubblewrap CLI generates the Android project from your web app manifest:
npm i -g @bubblewrap/cli
bubblewrap init --manifest https://example.com/game/manifest.json
bubblewrap build
# outputs app-release-signed.apk (to test) and app-release-bundle.aab (for Google Play)Bubblewrap needs Node.js 18 or later and JDK 17, and offers to download the Android SDK on first run. A TWA is the lightest route and updates whenever you update the website, but the game must be hosted, and it should cache itself with a service worker so it starts offline.
Option 2: Capacitor
Capacitor bundles your built files inside the app and shows them in the system WebView. Version 8 is the current major as of October 2026, with Android 7.0 (API 24) and iOS 15 as minimums. From your game's project folder:
npm i @capacitor/core
npm i -D @capacitor/cli
npx cap init # app name, app id, and webDir (e.g. dist)
npm i @capacitor/android @capacitor/ios
npx cap add android
npm run build && npx cap sync # copy the built game into the native projects
npx cap open android # build, sign and run from Android StudioCapacitor's webDir must contain an index.html with a <head> tag. After each change to the game, rebuild and run npx cap sync again. Plugins cover in-app purchases, ads, haptics and status-bar control when you need them.
Option 3: compile the HTML5 game with Cordova
Apache Cordova is the older project Capacitor grew out of, and it's still maintained: cordova-android 15.1.0 shipped in July 2026. Your game goes in the project's www folder:
cordova create mygame com.example.mygame "My Game"
cd mygame
# replace www/ with your built game (index.html at www/index.html)
cordova platform add android
cordova run android # debug APK on a connected phone
cordova build android --release # release builds default to an AABThe Cordova Android guide explains signing with a keystore or a build.json file. If you're following an old PhoneGap HTML5 game tutorial: Adobe discontinued PhoneGap and shut down PhoneGap Build in October 2020. The commands map almost one to one onto Cordova, so replace phonegap with cordova and skip the cloud build service.
Option 4: get an external HTML5 game to work in Android Studio
If you'd rather not add a framework, a plain Android Studio project with one WebView is enough. Put the built game in app/src/main/assets/ and serve it with WebViewAssetLoader, which gives the game a real HTTPS origin. Loading it from file:// is the classic mistake: Android treats file URLs as opaque origins, so fetch() and XHR calls for levels and sprite sheets fail.
val assetLoader = WebViewAssetLoader.Builder()
.addPathHandler("/assets/", WebViewAssetLoader.AssetsPathHandler(this))
.build()
webView.settings.javaScriptEnabled = true
webView.settings.domStorageEnabled = true // localStorage saves
webView.settings.mediaPlaybackRequiresUserGesture = false // let the game start its own audio
webView.webViewClient = object : WebViewClientCompat() {
override fun shouldInterceptRequest(view: WebView, request: WebResourceRequest) =
assetLoader.shouldInterceptRequest(request.url)
}
webView.loadUrl("https://appassets.androidplatform.net/assets/index.html")Add the androidx.webkit dependency, make the activity full screen, and handle the back button with OnBackPressedDispatcher so it calls into the game instead of closing the activity.
How to publish an HTML5 game on the Google Play Store in 2026
The wrapping is the easy half. Google Play's requirements, as of October 2026:
- Developer account: a US$25 one-time registration fee.
- Testing before launch: personal accounts created after 13 November 2023 must run a closed test with at least 12 testers opted in for 14 days in a row before they can publish to production.
- Target API level: from 31 August 2026, new apps and updates must target Android 16 (API level 36). Update Capacitor, Cordova or your Gradle files before you build.
- No bare website wrappers: Play's spam policy doesn't allow apps whose primary purpose is a webview of a website without permission. A game bundled in the app, playable offline, with no browser UI, is a game; a WebView pointed at someone else's portal is not.
- Listing work: a content rating questionnaire, a Data safety form, screenshots and a privacy policy URL.
- Outside Google Play: Android's developer verification starts on 30 September 2026 for installs from participating stores in Brazil, Indonesia, Singapore and Thailand, and expands globally from 2027. If you plan to hand out APK files directly, check its rules first.
Our guide to publishing HTML5 games covers web portals and the other places a game can go.
Turn an HTML5 game into an iOS app
Capacitor is the most direct route to iPhone: npx cap add ios, then build and sign in Xcode on a Mac (Capacitor 8 needs Xcode 26). You need a paid Apple Developer Program membership, US$99 a year, to publish. The game runs in WKWebView, the same engine as Safari, so the same audio rules apply; the upside is that the app has no browser bars, which solves the fullscreen problem iPhone browsers have.
Review is stricter than Google's. Apple's App Review Guidelines say an app should offer more than "a repackaged website" (4.2, minimum functionality), and apps may not download code that adds or changes features (2.5.2). Bundle the game inside the app, make it work offline, and make it feel like an app: native-feeling menus, no web links in the main flow, saves that survive restarts. Guideline 4.7 separately covers apps that offer HTML5 mini games not embedded in the binary, the model for a portal-style app with many games.
People also search for creating HTML5 games for iMessage. There's no HTML5 export for it: iMessage apps are extensions bundled with an iOS app and built with Apple's Messages framework, so a web game can only reach Messages inside a native project you build in Xcode.
How to bundle an HTML5 game for desktop
Yes, you can turn an HTML5 game into a Windows game, and into a Mac and Linux game at the same time.
Electron
Electron embeds Chromium and Node.js, so your game renders identically on every desktop OS. Electron 45 is the current major as of October 2026. Create a project with Electron Forge (npx create-electron-app@latest my-game), copy the built game into it, and point the main process at it:
const { app, BrowserWindow } = require("electron");
const path = require("node:path");
app.whenReady().then(() => {
const win = new BrowserWindow({ width: 1280, height: 720, backgroundColor: "#000000", autoHideMenuBar: true });
win.loadFile(path.join(__dirname, "game", "index.html"));
});
app.on("window-all-closed", () => app.quit());npm run make produces installers for the platform you build on. The cost is size: every build carries its own copy of Chromium, which dwarfs a game of a few hundred kilobytes.
Tauri 2
Tauri 2 uses the webview the operating system already has: WebView2 on Windows, WKWebView on macOS and WebKitGTK on Linux. Tauri says apps can be as small as 600 KB. The trade-off is that your game now runs on Chromium on Windows and WebKit on macOS and Linux, so test WebGL, audio and input on each. You also need a Rust toolchain to build. Tauri 2 can target Android and iOS as well.
NW.js and older tutorials
Tutorials on bundling an HTML5 game for desktop from around 2018 usually use NW.js, an early Electron or a Chrome App. NW.js is still released (0.119 in October 2026). Chrome Apps are the dead end: Google deprecated them in 2020, and the remaining kiosk and managed-device apps reach end of life in 2027 and 2028. You can't convert an HTML5 game into a Google Chrome app today; ship it as an installable web app instead, which desktop Chrome can install from the address bar.
Steam
Steam sells desktop builds, so an Electron, NW.js or Tauri wrapper is how an HTML5 game gets there. The Steam Direct fee is US$100 per game, recoupable once the game makes US$1,000 in adjusted gross revenue. The Steamworks SDK is only required to upload your build; achievements and the overlay are optional and need a native bridge from JavaScript (community bindings such as steamworks.js exist, so check they're maintained). Steam players expect gamepad support, keyboard remapping and a windowed mode, so test those before you submit.
Build an HTML5 game as a mobile app from the start
If the app is the goal from day one, a few design choices save rework:
- Plan for the app being closed at any second: save on every meaningful change, not on exit.
- Use wall-clock time for anything that progresses while the player is away.
- Keep everything offline and local, including fonts.
- Design store screenshots and the first 30 seconds together; that's what decides installs.
A virtual pet game made with HTML5 and Cordova is a good example. The pet should get hungry while the app is closed, so store a timestamp and catch up when the player returns:
// Apply the hours the app was closed, capped so a long holiday isn't fatal.
function catchUp(pet, now = Date.now()) {
const hours = Math.min((now - pet.lastSeen) / 3_600_000, 24);
pet.hunger = Math.min(100, pet.hunger + hours * 4);
pet.happiness = Math.max(0, pet.happiness - hours * 2);
pet.lastSeen = now;
}
// visibilitychange fires in Cordova, Capacitor and the browser alike.
document.addEventListener("visibilitychange", () => {
if (!document.hidden) { catchUp(pet); save(pet); render(); }
});A local-notification plugin can then remind the player to feed the pet, which is the kind of native feature that makes a wrapped game feel like an app.
Shipping one of our games as an app: the licence
Wrapping one of our games in an Android, iOS or desktop app counts as an end product under our draft licence terms. The Standard licence covers one end product, yours or one named client's; the Extended licence covers up to five, including client work. If you plan several versions (web, Android, iOS) or several apps from one game, read the licence terms before you buy, and remember they're drafts until legal review. Your app ships the built game, which is the point; publishing the source code itself, for example in a public repository, isn't allowed under either licence.
Every one of our games supports touch, mouse, keyboard and gamepad, plays in portrait, landscape or both, and saves progress locally, which covers most of the preparation list above. Start with our mobile-ready HTML5 games or browse all 50 games.
Browse mobile-ready HTML5 games
Frequently asked questions
Can you turn an HTML5 game into a Windows game?
Yes. Wrap the built game with Electron, Tauri or NW.js and you get a Windows executable and installer, with macOS and Linux builds from the same project. Electron renders with the same Chromium everywhere; Tauri uses the system webview and produces much smaller downloads.
What's the best way to convert an HTML5 game to an Android APK in 2026?
For most games, Capacitor: it bundles the game for offline play, produces debug APKs and release AABs through Android Studio, and gives you iOS from the same project. If the game is already hosted as a web app and you only want Google Play, a Trusted Web Activity built with Bubblewrap is lighter.
Will Apple accept an HTML5 game wrapped as an iOS app?
It can, if the game is bundled in the app, works offline and feels like an app. Apple rejects apps that are little more than a repackaged website under guideline 4.2, so a WebView pointing at your site is the risky version.
Is PhoneGap still an option for HTML5 games?
No. Adobe stopped developing PhoneGap and closed PhoneGap Build in 2020. Apache Cordova, which PhoneGap was based on, is still maintained, and Capacitor is its modern successor; old PhoneGap tutorials translate directly to Cordova commands.
Can I publish one of your games on Google Play?
Yes, as an end product under our draft licences: one app under Standard, up to five end products under Extended. You can reskin and rebrand it; check the licensing page if you also plan a web version or several apps from the same game.
We make and sell HTML5 game source code; links to our games are marked as ours.