Use cases & safety

Is your HTML app safe? Security basics for bundled apps

Anyone can unzip an APK and read your HTML. What that means for API keys, passwords and "hidden" content, what a bundled app is protected against, and the handful of habits that keep an HTML app as safe as it needs to be.

7 min read Updated September 2026

An APK is a ZIP file, and your HTML, CSS and JavaScript sit inside it in plain text, readable by anyone who renames and extracts it. That is the one security fact to organise everything else around: nothing in the bundle is secret. A bundled HTML app is otherwise in a reasonably safe position — it has no server to attack, its data is in a private directory other apps cannot read, and its permissions are only what you declared. The risks are the ones you ship yourself: an API key in a script, a password check in JavaScript, content that was meant to be paid for. Each has a standard answer.

Never put a secret in the bundle

This includes: API keys for paid services, database credentials, a "master password", private endpoints, unreleased content. If the app needs to call a service that requires a key, the key must live on a server you control and the app must call your server, which adds the key and forwards the request. A key in the JavaScript is a key on the internet within a day of the app being popular — automated scanners extract them from APKs routinely.

Public keys — a Firebase web config, a Google Maps browser key restricted to your package name, an analytics ID — are designed to ship in clients and are fine. The test: if the provider's documentation says to put it in front-end code and lets you restrict it, it is a public key.

Logins that live in JavaScript are not logins

if (password === 'letmein') in a bundled script is a suggestion, not a lock: the user can read the password, or edit the check out. The same goes for a hidden "premium" section toggled by a flag. If access control matters, it needs a server that checks credentials and returns the protected content only after; if it does not really matter — a family app, a classroom tool — a client-side gate is fine as long as you know that is what it is.

What the phone protects

Network calls, if any

If the app talks to your API, use HTTPS only. The builder's shell blocks mixed content by default — an http:// request from a bundled page fails — which is the right default; do not turn it off. Treat everything from the network as untrusted, the same as on the web: insert it into the page with textContent, not innerHTML, unless it is HTML you generated and trust.

User input inside the app

The classic web risk, cross-site scripting, is smaller in a bundled app — there is no site for a third party to inject into — but not zero if your app renders content from other users or from the network. Escape it. If the app lets users paste HTML on purpose (a notes app with formatting), render it in a sandboxed <iframe srcdoc> or strip scripts with a sanitiser you bundle.

The habits

  1. Before every build, search the folder for key, secret, password and token. The minifier also strips comments, which is where "TODO remove this key" tends to live.
  2. Keep the keystore and its password out of the project folder and out of any repository.
  3. Declare only the permissions the page uses.
  4. HTTPS for every request; mixed content stays blocked.
  5. Write the privacy policy from what the app really does, and keep it true as the app changes.
    App Privacy Policy GeneratorA privacy policy for an HTML app, written from what your app actually does Open the tool

Questions people ask

Can people see my source code in the APK?

Yes. An APK is a ZIP; your HTML, CSS and JavaScript are inside it as plain files. Minifying makes it harder to read, not impossible. Assume it is public.

Is it safe to put my Firebase config in the app?

The web config (API key, project ID, app ID) is designed to be public and is protected by Firebase's security rules and App Check, not by secrecy. Server-side keys and service-account files must never ship.

Is localStorage secure?

It is private to the app on an unrooted phone, which is enough for the user's own settings and notes. It is not encrypted and is included in device backups, so do not store secrets, tokens or sensitive personal data there.

Can an HTML app be hacked?

It has a small attack surface: no server, a sandboxed WebView, declared permissions only. The realistic risks are secrets you ship and unescaped content you render — both under your control.

Does the builder add anything to my code?

The shell around your files is standard WebView configuration. Your HTML is bundled unchanged. Nothing of ours runs inside your page.

Read next

Your HTML, installed on a phone today

Upload the file or ZIP, pick a name and an icon, and download a signed Android APK in minutes. Free to start — no Android Studio, no code changes, no card.

Convert HTML to APK — free