Make an Offline Android App From a ZIP of a Static Website
A static website is just files: HTML pages, CSS, JavaScript and images. That makes it a good fit for an offline Android app. If you put the whole folder into a ZIP, Free HTML to APK can package every page inside an APK, so the app opens without internet and does not depend on a server.
This works well for portfolios, documentation, manuals, menus, course notes, small business brochures and personal projects. It is not meant for a site that needs a live database or login on a server, because there is no server inside the APK. This guide shows how to prepare the ZIP, build the app, and fix the problems that most often appear.
Is your site a good match?
An offline ZIP app suits you if:
- Your pages are plain HTML, CSS and JavaScript, or a build output from a tool that produces those files.
- All content is in the files, or is stored by the page itself with localStorage.
- You are fine with updating the app by building a new version when the content changes.
It is a poor match if every page is generated by a server on request (for example a typical WordPress theme). In that case the site needs its server, and the offline ZIP approach will not copy it.
Step 1: Check the folder structure
A tidy structure looks like this:
index.html(the home page)about.html,contact.html, and other pagescss/style.cssjs/app.jsimages/logo.pngand other pictures
The home page must be called index.html. If your main page has another name, rename it and update any links that point to it.
Step 2: Fix paths before you zip
Path mistakes cause most blank pages and missing pictures. Go through these checks:
- Use relative links. Write
images/logo.pngor./images/logo.png. Avoid addresses that start with your domain name, and avoid paths from your computer. - Watch the leading slash. A path such as
/css/style.cssmeans "from the root of the site", and it can fail when the files are packaged. A path such ascss/style.cssis safer. For pages inside sub-folders, use../css/style.css. - Match letter case exactly.
Logo.PNGandlogo.pngare different files on Android. Rename files to lower case and update the references to match. - Avoid spaces and odd characters in file names. Use
my-photo.jpginstead ofMy Photo (1).jpg. - Link pages to files. Use
about.html, not just/about. Pretty URLs depend on a web server that the app does not have.
Step 3: Replace outside resources
Look for any http:// or https:// in your <link>, <script>, <img> and CSS url() entries. Common ones are CDN copies of a CSS framework, icon fonts and web fonts. These load only when the phone has internet, so an offline app would show unstyled pages or empty icons.
The fix is simple: download each file, place it in your project folder (for example in vendor/), and change the reference to the local copy. Check the licence of anything you copy, and keep the licence notice if one is required.
Links to other websites are fine to keep. They simply will not work when the phone is offline.
Step 4: Make the ZIP correctly
Select the files and folders inside your project folder and compress those. The ZIP should open with index.html straight away, not with one extra folder wrapping everything. If you open the ZIP and see a single folder first, the structure is one level too deep, and the app may not find your home page.
Step 5: Build the app
- Open Free HTML to APK.
- Choose your ZIP file.
- Set an app name and an icon. Use a clear square image.
- Pick the orientation and optional splash screen.
- Tap Build, then install the APK.
Test it in airplane mode. Tap every link and button, scroll every page, and look for missing images.
Common pitfalls and fixes
| Problem | Likely cause | Fix |
|---|---|---|
| Blank screen | index.html is missing or inside an extra folder | Rebuild the ZIP so it opens directly to index.html |
| Page has no styling | CSS path wrong or loaded from a CDN | Use a relative local path |
| Some images missing | Letter case or spaces in the file name | Rename files and update references |
| Link goes to a blank page | Link has no .html or starts with / | Link to the actual file |
| Contact form does nothing | Form posts to a server that is not there | Use a link such as mailto: or a hosted form service that needs internet |
| Icons show as squares | Icon font loaded from the web | Download the font files, or use inline SVG |
Keeping content up to date
Because everything is packaged, changing the site means building and installing a new version. Plan for this: keep your source folder safe, change the files there, then zip and rebuild. If your content changes daily, a live website app is a better choice than an offline package.
You can get the builder here: Free HTML to APK on Google Play.
FAQ
Does the app need internet to open?
No. The pages are packaged inside the APK and open offline. Only parts that load outside content, such as a map or an online video, need a connection.
Can I use JavaScript and localStorage?
Yes. HTML, CSS, JavaScript and localStorage are supported, so a page can remember settings or notes on the phone.
Why does my site work in the browser but not in the app?
The usual causes are root-style paths, a wrong letter case in a file name, or resources loaded from a CDN. Check these first.
Can I publish it on Google Play?
You get an AAB file, which is the format Google Play asks for. Whether Google accepts a given app depends on its policies and content, so read the current rules before you submit.