Definition

What is Android System WebView and should you uninstall it?

Android System WebView is a system component for the Android operating system (OS) that enables Android apps to display web content directly inside an application.

There are two ways to open web content on an Android device: using a traditional web browser or an Android application that includes WebView in the layout.

Android WebView is built on the open source Chromium engine. This is the same engine that powers Google Chrome.

A developer who wants to add browser functionality to an application can include the WebView library and create an instance of a WebView class. This approach essentially embeds a browser within the app to do things like render webpages and execute scripts.

In the past, WebView was tightly coupled with the OS, and it was only updated when a new version of the OS was released. This slower release schedule made it possible that an exploit that was fixed in Chrome wasn't yet fixed in WebView. It is now a discrete application that can be updated through the Google Play app store.

All operating systems have an equivalent WebView component. In Windows 11, this is Edge WebView2, and in iOS and macOS, it is WKWebView.

Screenshot of an embedded WebView login page.
When Android System WebView is used to embed a login function, users are taken to a web login screen within the app. Exiting the login page brings them back to the app.

Why is Android System WebView needed?

Android System WebView lets applications display web content in an app instead of transporting the user to another browser. Android developers use WebView when they want to display webpages or Hypertext Markup Language content in a Google app or other application.

The following are examples of how WebView can be used to embed webpages:

  • When users click on a privacy policy link on a screen in an Android System WebView app, the application opens a webpage with the privacy policy content instead of taking them to a browser.
  • Users use a social media account to log in to an application. Developers use WebView to embed a social media application's login window inside their application and give users a choice as to how to log in. Instead of coding a sign-in function from scratch, WebView lets developers import the social sign-in function.
  • WebView is used to take an existing website and present it as a native app. Using WebView this way is a low-code method of constructing hybrid applications that free developers from having to code native applications from scratch.

Malicious actors can use WebView to exploit devices, using tactics such as cross-site scripting. This is why it is important that Android System WebView be kept up to date.

Native app vs. hybrid app overview comparison chart.
WebView is useful for crafting hybrid applications with highly reusable code and less code than native apps.

History of Android System WebView

Early versions of WebView were integrated as part of the core Android OS. Users could only update WebView through larger system updates. Because each device manufacturer releases its own system updates, there was sometimes a long wait between when Google released the code to fix a flaw in WebView and when a manufacturer released the update.

With the release of Android 5, Google separated WebView from the core OS. With this change, WebView updates could be distributed through the Google Play Store app, and users could update WebView independently of the OS. If an issue was found in the WebView component, Google would push out a bug fix that users could install without having to completely update Android.

Google combined WebView with Google Chrome for Android versions 7, 8 and 9. However, with Android 10, WebView went back to being a separate component. Users can update WebView in Android 10 or higher through Google Play. Sometimes this requires they delete stored data from the application's cache before downloading the update.

Google no longer provides patches for vulnerabilities found in older versions -- 4.3 and earlier -- of Android. To protect devices from attacks that might exploit WebView's capabilities, the company recommends Android users run the latest version of the OS and update WebView when prompted.

Is it safe to uninstall Android System WebView?

It is not safe to uninstall Android System WebView. Recent versions of WebView are impossible to completely uninstall because it is system software and comes preinstalled on Android devices. Because WebView loads website content, removing WebView updates will take away recent security patches and could leave the system vulnerable to malicious software attacks.

However, it can be disabled on certain Android versions. Users might want to disable WebView for the following reasons:

  • They're unfamiliar with the Android System WebView application and mistake it for malicious spyware or useless bloatware.
  • It consumes more resources than they like.
  • They have a bad user experience, which happens occasionally because WebView can be poorly integrated into an application.
  • WebView doesn't work consistently on different versions of Android.

Google does not advise disabling WebView; users should keep it activated and updated. However, users running Android 7, 8 and 9 might want to disable it to conserve processing power or memory, or to avoid crashes related to update bugs. Users can safely disable Android System WebView in the following Android versions without experiencing adverse consequences:

  • Android 7 Nougat.
  • Android 8 Oreo.
  • Android 9 Pie.

Follow these steps to disable WebView in the three versions listed above:

  1. Go to Settings > Apps/application > More > Show system.
  2. Scroll to and select Android WebView.
  3. Tap Disable.

On Android 7, 8 and 9, Google Chrome handles the embedded browsing functions. On other Android OS versions, web app performance could suffer without WebView enabled. Operating without WebView can also introduce a security risk because it disables Android's default security configuration for embedding web content in applications. Developers can use third-party code instead of WebView or alternative Android browsers to perform the same task, although third-party code could have more built-in vulnerabilities.

How to clear WebView data

Android WebView has a cache and app data. This might store loaded pages and cookies. Although not generally needed, clearing this data can free up storage space or resolve some issues. Since this data can be used by other apps, users might need to reauthenticate or set up apps again after clearing it.

  1. Go to Settings > Apps > See all.
  2. Scroll to and select Android WebView.
  3. Tap Storage & Cache.
  4. Tap Clear storage or Clear cache.

How to add WebView to an app

To add WebView to an app, a developer first adds a WebView component to their Extensible Markup Language (XML) file, then gives it an ID and calls the loadUrl() function on it.

JournalDev -- now part of DigitalOcean -- provides the following example of how to insert WebView into an XML file in Android Studio using the Kotlin programming language:

<WebView android:id="@+id/webview"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

To give it an ID, a developer would write the following or something similar:

WebView = (webView) findViewById(R.id.webview);

And, finally, to pass the URL of a webpage as an argument in the application, the developer would write the following:

webView.loadUrl("https://www.example.com");

The method used to add WebView might differ slightly depending on the language used to write the application. WebView can be embedded in both Android applications and iOS applications on iPhones and iPads.

JavaScript in WebView

JavaScript in WebView is disabled by default. This means webpages containing JavaScript references will malfunction. To enable JavaScript, a developer using the Kotlin command line would add the following code to the WebView instance:

getSettings().setJavaScriptEnabled(true);

End users might find it helpful to use JavaScript with Android WebView so that certain applications work as intended. To enable JavaScript in WebView in Chrome, follow these six steps:

  1. Click the three stacked dots next to the URL bar in the browser.
  2. Select Settings from the drop-down menu.
  3. Under the Advanced header, select Site Settings.
  4. Select JavaScript.
  5. Toggle the switch to the right so that JavaScript is activated.
  6. Refresh the browser.

In some cases, WebView can save developers time and energy by embedding already existing code into an application. Learn how low-code development works and how it can benefit the enterprise.

This was last updated in October 2024

Continue Reading About What is Android System WebView and should you uninstall it?

Dig Deeper on Application and platform security