To turn an HTML5 game into an APK, export the game as a web build, zip the export folder with index.html at the root, and upload it to an HTML 2 APK builder. The game is bundled inside the APK and rendered by Android's Chromium WebView with canvas, WebGL, Web Audio and WebAssembly support, so it plays offline exactly as it does in mobile Chrome.
- Phaser, PixiJS, Three.js, Babylon.js, Kaboom/Kaplay games
- Construct 3, GDevelop, GameMaker HTML5, Defold web exports
- Puzzle, idle, arcade and word games
- Game-jam entries you want on the Play Store
Which engines and exports work
Anything that runs in Chrome on Android runs in the app, because the APK uses the same engine: the Android System WebView, which is Chromium and is updated through Google Play on Android 7 and later. That covers canvas 2D, WebGL 1 and 2, Web Audio, WebAssembly, gamepad and touch events.
| Engine / tool | What to upload | Notes |
|---|---|---|
| Phaser 3 | The dist/ folder of your build, zipped | Phaser recipe → |
| PixiJS / Three.js / Babylon.js | Your bundler's output folder | Bundle the library — no CDN script tags |
| Construct 3 | Export → Web (HTML5), zip the folder | Untick "offline support" service worker; the app is offline already |
| GDevelop | Export → HTML5 (local folder) | Works as exported |
| GameMaker | HTML5 target, zip the output | Requires the HTML5 export licence |
| Godot 4 (web) | Web export | Needs threads off ("Thread Support" unchecked); large .wasm/.pck sizes may need Pro's 18 MB |
| Unity WebGL | — | Builds usually exceed 18 MB and run poorly in mobile WebViews; use Unity's native Android target |
Making it feel like a game, not a web page
- Fill the screen. Size the canvas to
window.innerWidth/innerHeightand listen forresize. Useviewport-fit=coverand the safe-area CSS variables so HUD elements avoid the camera cut-out. - Kill browser gestures.
touch-action: noneon the canvas,user-select: noneand-webkit-touch-callout: noneon the body, andoverscroll-behavior: noneso a swipe never scrolls or refreshes the page. - Handle orientation in the game. Design for both, or show a "rotate your phone" overlay when the aspect is wrong. The orientation snippet generator writes the CSS and JS.
- Unlock audio on the first tap. Mobile Chromium blocks audio until a user gesture; resume the
AudioContextin your firstpointerdownhandler. - Pause when hidden. Stop the loop on
visibilitychangeso the game does not drain the battery from the background.
Full details, with frame-rate numbers: HTML5 game performance on Android.
Saves, leaderboards and ads
Save games in localStorage (simple) or IndexedDB (larger); both persist across launches and app updates. Online leaderboards work through your own API over https. Ad networks built for the web may not serve inside an app's WebView — check your network's policy before relying on it — so many HTML5 game developers monetise with a paid "remove ads"/full-version build on Play, or with an online store link.
navigator.vibrate() is ignored in apps built with HTML to App, because the app does not declare Android's VIBRATE permission. Make haptics optional in your game.HTML5 game to APK — questions
Will my HTML5 game run as fast as in Chrome?
Yes — it is the same Chromium engine with the same GPU acceleration. If the game is smooth in Chrome on the same phone, it will be smooth in the APK. If it stutters in Chrome, fix it there first.
Can I publish an HTML5 game on Google Play?
Yes. Build an AAB (Pro), add a privacy policy, fill in the Data safety and content-rating questionnaires, and pass the closed-test requirement if your developer account is new. Games are a common, accepted category for HTML5 apps.
Does the game work offline?
Yes, as long as every asset is inside the ZIP. Bundle the engine library, sprites, audio and fonts rather than loading them from a CDN.
Can I lock the game to landscape?
Handle orientation inside the game: design responsive layouts or show a rotate-your-device overlay. The orientation snippet generator on this site produces the code.