To convert an HTML template into an APK, copy only the pages you use into a fresh folder with their CSS, JS, fonts and images, remove website-only parts (preloader, cookie bar, newsletter, PHP contact form), make paths relative, check the licence allows app use, then ZIP and build. A trimmed template is usually 1–3 MB, well within builder limits.
Key takeaways
- Templates ship many demo pages and assets — copy only what you use.
- PHP contact forms do nothing in an APK; use a form service or mailto.
- Read the licence: some template licences cover one end product only.
1. Trim to what you use
A typical template folder has dozens of HTML variants, several colour skins, a scss/ source folder, documentation and unused plugins. Start a new folder and copy across: the pages you want (rename your main one index.html), the compiled CSS, the JS files those pages include, the fonts folder and only the images you show. The size of an HTML APK is driven almost entirely by images.
2. Remove website-only features
| Template feature | In an app | Do this |
|---|---|---|
| Page preloader / spinner | Delays every launch | Remove, or use the builder's page loader |
PHP contact form (mail.php) | No PHP runs inside an APK | Post to a form service or use mailto: |
| Google Maps iframe | Online only | Static map image + a link that opens the Maps app |
| Cookie banner | Not needed for bundled files | Remove (keep your app's privacy policy) |
| Back-to-top button | Fine | Optional |
| Smooth-scroll and parallax libraries | Can stutter on low-end phones | Remove or simplify |
3. Make the contact form work
A form inside your APK can submit to any https endpoint that accepts it. Form back-ends such as Formspree or Basin take a normal POST and email you; your own API works too, as long as it allows cross-origin requests from https://appassets.androidplatform.net. Details in HTML forms in an Android app.
4. Fix paths and CDNs
Templates are usually written with relative paths already, but check the CSS for url(/ and the HTML for Google Fonts and CDN-hosted plugins (Font Awesome, AOS, Swiper). Bundle them — the offline fonts guide covers fonts.
5. Check the licence
HTML5 UP templates are under Creative Commons Attribution: free for any use, with a credit. ThemeForest's Regular Licence covers one end product that you don't charge users for; a paid app generally needs the Extended Licence. Free templates from Start Bootstrap are MIT. When in doubt, read the licence file in the download.
6. Build and test
ZIP the trimmed folder's contents and build it in HTML & ZIP to APK Builder. Tap every menu item: template menus often use hover dropdowns that need a tap handler on touchscreens.
Frequently asked questions
Can I sell an app made from a template?
Only if the template's licence allows it. Many marketplace licences require an extended licence for a product you sell; free licences such as MIT and CC BY allow it with attribution.
Why does my template's menu not open in the app?
Hover-only dropdowns do not trigger on touch. Use the template's mobile menu, or add a click handler that toggles the dropdown.