html2apk Get the app

How to convert HTML to an APK, step by step

The complete HTML2APK walkthrough — from a folder of web files to an app icon on your home screen — with the checks that stop the problems before they happen.

Updated 12 October 2026By HTML2APK Editorial Team11 min read
Short answer

To convert HTML to an APK, put your page in a file called index.html, make every link and asset path relative, download any CDN files into the project, zip the folder so index.html is at the top of the archive, then upload it to an HTML-to-APK builder such as the free HTML & ZIP to APK Builder app. It wraps your files in an Android WebView app, signs it, and gives you an APK to install in a few minutes.

Key takeaways

  • An HTML APK is a small Android app whose screen is a WebView showing your bundled files.
  • Most failed conversions come from three things: absolute paths, CDN files and a missing index.html.
  • A single HTML file needs no ZIP; a multi-file project does.
  • Free builds give a signed APK you can install anywhere; Google Play needs an AAB.

What actually happens when HTML becomes an APK

An APK (Android Package) is a ZIP-format archive containing compiled code, resources, a manifest and a signature. When you convert HTML to APK you are not translating HTML into Java or Kotlin. The builder takes a ready-made Android app — a thin native shell around Android's WebView, the same Chromium engine as Chrome — copies your files into its assets folder, sets your app name, icon and package name, then signs the result.

When someone opens the app, the shell starts a WebView and loads your index.html from inside the APK. In apps built with HTML2APK the files are served from https://appassets.androidplatform.net/web/, a private https address that only exists inside your app. That detail matters later: it is why relative paths work and root paths do not.

If you want to see the parts, what is inside an APK file walks through each folder.

Step 1 — Get your entry page right

The app opens one file first. Name it index.html and put it at the top level of your project. Check three things in its <head>:

<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"> <title>My App</title> <link rel="stylesheet" href="css/style.css"> </head>
  • A doctype, so the WebView renders in standards mode, not quirks mode.
  • A viewport meta tag. Without it Android renders the page at desktop width (980px) and shrinks it — the number-one reason a converted page "looks tiny".
  • A charset, so accented characters and emoji display correctly.

Step 2 — Make every path relative

Look for any src, href or CSS url() that starts with a slash. On a website, /css/style.css means "from the root of the domain". Inside the app the root is appassets.androidplatform.net/, one level above your files in /web/, so the file is not found and the page loads unstyled — or blank.

Path in your HTMLWebsiteInside the APK
css/style.cssWorksWorks
./css/style.cssWorksWorks
/css/style.cssWorksNot found
https://cdn…/lib.jsWorksOnly when online

Find-and-replace ="/ with =" in your HTML (check each hit), and url(/ with url( in CSS — remembering that CSS paths are relative to the CSS file, so a stylesheet in css/ reaches images with ../img/.

Step 3 — Bring CDN files inside the project

A page that loads jQuery, Bootstrap, a chart library or Google Fonts from the internet works in the app only while the phone is online, and the first launch on a slow connection shows a half-styled page. Download each file into a vendor/ folder and point the tag at it:

<!-- before --> <script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.umd.min.js"></script> <!-- after --> <script src="vendor/chart.umd.min.js"></script>

Fonts need one extra step — see using custom fonts offline.

Step 4 — Test it like a phone, on your computer

Serve the folder over http — double-clicking index.html opens it as file://, which behaves differently — and open it with your browser's device toolbar at a 360–412px width.

cd my-app python3 -m http.server 8000 # open http://localhost:8000 → DevTools → Toggle device toolbar

Fix anything red in the console now: a release APK has no developer console, so errors are much harder to find later. Paste your page into the phone frame preview for a quick look at real phone sizes.

Step 5 — Package it

A single self-contained HTML file (styles and scripts inline) can be uploaded as it is. A multi-file project goes in a ZIP. Select the contents of the folder — not the folder itself — and compress, so the archive opens straight onto index.html:

my-app.zip ├── index.html ├── css/style.css ├── js/app.js ├── img/logo.png └── vendor/chart.umd.min.js

Leave out source files, node_modules, design files and videos you do not use: the free plan accepts 5 MB of zipped content and Pro accepts 18 MB.

Step 6 — Build the APK

  1. Install HTML & ZIP to APK Builder from Google Play (free).
  2. Choose your HTML file or ZIP.
  3. Enter the app name, pick a square icon (512×512 PNG is ideal), and a package name such as com.yourname.notes. The package name is permanent once an app is published, so choose carefully.
  4. Pick a theme colour and, optionally, a page loader and pull-to-refresh.
  5. Tap build. The app is compiled and signed in the cloud and lands back on your phone a few minutes later.

Step 7 — Install and test on a real phone

Tap the APK, allow the app you downloaded it with to install unknown apps when Android asks, and tap Install. Then run the ten-minute test:

  • Launch with Wi-Fi and mobile data off — does every screen still render?
  • Press the system back button on every screen. It follows your page history; on the first page it closes the app.
  • Rotate the phone, open the keyboard on every input, and check nothing is hidden behind it.
  • Force-stop and relaunch — is saved data still there?

If something fails, the on-phone debugging guide shows how to see JavaScript errors without a cable or DevTools. If Android refuses to install, the install error reference decodes the message.

Going further: Google Play

An APK is perfect for testing, sharing with clients or distributing yourself. Google Play only accepts new apps as an Android App Bundle (AAB) signed with a key you keep. HTML2APK Pro builds the AAB and gives you your own signing key; you still need a Google Play developer account and a privacy policy.

Frequently asked questions

Can I convert HTML to APK without Android Studio?

Yes. An online or on-phone builder packages your HTML into a ready-made WebView app and signs it, so you never install Android Studio, the Android SDK or Gradle.

Does the APK work offline?

Yes, as long as every file the page uses is inside the APK. Anything loaded from another server — a CDN script, a web font, an API — needs a connection unless you bundle or cache it.

Is an HTML APK a real Android app?

Yes. It installs, has its own icon, package name, storage and permissions, and appears in Settings like any other app. Its interface is drawn by a WebView instead of native widgets.

Can I convert an APK back to HTML?

Only if it was built from HTML — the files sit in the APK's assets folder and can be unzipped. Native apps cannot be turned back into HTML. See the full answer under Questions.

H2

HTML2APK Editorial Team
Written and checked against the app our builder actually produces. Found an error? Tell us.

Turn your HTML into an APK today

Install the free builder on your Android phone, add your HTML file, ZIP or website, and install a signed APK a few minutes later. No watermark, no card.