1. Home
  2. Tools
  3. WebView code generator

Free tool · runs in your browser

WebView app code generator

Fill in your website and options and get the three files you need to turn it into an Android app in Android Studio — modern Kotlin, no deprecated APIs.

How to use it

  1. Enter your website. Type the full https:// address the app should open.
  2. Set name and package. Choose the app name and a unique package name such as com.yourname.app.
  3. Pick features. Tick file uploads, downloads, offline page, pull to refresh or location.
  4. Copy each file. Switch between the tabs and paste each file into the path shown in Android Studio.

What the generated app does

The code builds a single-screen Android app whose whole screen is a WebView showing your site. It keeps your own domain inside the app and hands everything else — other websites, tel:, mailto:, WhatsApp — to the right app on the phone. The system Back button walks back through page history before closing the app, and the page survives rotation.

Optional pieces add the things a WebView doesn't do by default: a file chooser for <input type="file">, downloads through Android's DownloadManager (with cookies, so logged-in downloads work), a branded offline page and pull to refresh.

Where each file goes

Create a new Empty Views Activity project with the same package name, then replace the generated files. Hover a tab to see its path. Build with Build → Generate Signed App Bundle / APK. The Android Studio guide walks through it, or skip the setup entirely with the no-code converter.

Private by design: this tool runs entirely on your device. Nothing you type or add here is sent to a server.

Create your app now — free

No watermark, no card, no Android Studio. Pick what you're starting from:

Frequently asked questions

Is this WebView code up to date?

Yes. It uses OnBackPressedDispatcher and the Activity Result API instead of the deprecated onBackPressed and startActivityForResult, and targets SDK 36.

Does it work with Java projects?

The generated code is Kotlin. You can add Kotlin to a Java project, or translate it — the WebView APIs are identical.

Why does the offline page use file:///android_asset?

It's a single static page with no imports, so the asset URL is fine. For a whole offline site, use WebViewAssetLoader instead.

Can I publish the result on Google Play?

Yes, once it's your own site and you sign it as an App Bundle. See the publishing guide.