← All articles

Android emulator for browser testing: how to test a website on Android

Test a website on Android Chrome from your computer: Chrome mobile views, the Android Studio emulator and remote debugging a real phone.

To test a website on Android from a computer, start with an Android-sized view in desktop Chrome, then confirm on the Android Studio emulator or a real phone connected with USB debugging. Desktop Chrome is a closer stand-in for Android than for iPhone, because Chrome on Android uses the same Blink engine. The emulator and the real phone add what desktop Chrome cannot: the real browser UI, the keyboard and mobile hardware.

Why Android is easier to approximate than iPhone

On iPhone, the browser engine is almost always WebKit, which desktop Chrome does not use. On Android, the default browser for most people is Chrome, built on the same engine as desktop Chrome. So when you emulate an Android phone in desktop Chrome, the CSS and JavaScript behaviour is usually the same, and the main differences are screen size, input, performance and browser UI.

The catch is variety. Android phones come in many widths (commonly 360 to 412 CSS pixels in portrait), pixel ratios and browsers. Samsung Internet, which comes preinstalled on Samsung phones, has its own release schedule and settings, such as a forced dark mode, that can change how a site looks.

Step 1: an Android-sized view in Chrome

For layout checks, use either tool:

  • DevTools device mode. Open DevTools, press Ctrl + Shift + M (Cmd + Shift + M on a Mac), pick a Pixel or Galaxy preset, and reload. Device mode emulates touch events and lets you throttle CPU and network. Full steps: Chrome mobile emulator guide.
  • A mobile view extension. Mobile View Extension has Android presets and reloads the current tab with the matching user agent, screen size and pixel ratio, without opening DevTools. It is handy for clicking through many pages quickly.

Test at least 360 px and 412 px wide, plus landscape.

Step 2: the Android Studio emulator

Android Studio is Google’s free development environment for Android, available for Windows, macOS and Linux. It includes an emulator that runs a full Android system image.

  1. Install Android Studio and open Device Manager.
  2. Create a virtual device. Pick a phone profile and a system image that includes Google Play, so Chrome is preinstalled.
  3. Start the device, open Chrome and enter your URL.

To reach a development server on your computer from the emulator, use the special address 10.0.2.2 instead of localhost. For example, http://10.0.2.2:5173 reaches a server on port 5173 of your machine. The emulator needs hardware virtualization enabled in your BIOS or system settings to run at a usable speed.

Step 3: a real Android phone with remote debugging

A real phone shows true performance and touch behaviour, and Chrome lets you inspect it from your desktop:

  1. On the phone, open Settings > About phone and tap Build number seven times to enable Developer options.
  2. In Developer options, turn on USB debugging.
  3. Connect the phone by USB and accept the debugging prompt on the phone.
  4. On your computer, open Chrome and go to chrome://inspect/#devices.
  5. Open your site in Chrome on the phone, then click inspect next to it on the desktop.

You get full DevTools for the page running on the phone, including a live screencast. The same page offers Port forwarding, which maps a port on the phone to your computer so localhost:3000 on the phone opens your local server. More on that in how to test localhost on mobile.

What about an Android emulator in the browser?

Searches for “android emulator for browser” usually mean one of two things. Some people want a website that runs Android in a browser tab. Services like that exist; they stream a remote emulator or real device and are typically paid or time-limited. Others want Chrome itself to act like an Android phone, which is exactly what device mode or a mobile view extension does.

For website testing, the second is almost always enough for layout, and the Android Studio emulator or a real phone covers the rest. Remote streaming services are useful when you cannot install anything locally.

What to check on Android specifically

  • Viewport widths of 360 and 412 px, the most common sizes for mid-range and flagship phones.
  • The on-screen keyboard. When it opens, the visible viewport shrinks. Fixed footers and chat buttons can cover input fields.
  • The system back button and gesture. Single-page apps should handle history so “back” does what the user expects.
  • Dark mode. Samsung Internet and Chrome’s experimental settings can darken pages that do not declare a colour scheme.
  • Font scaling. Android users often increase system font size. Check that text grows without breaking layouts.
  • Performance on a mid-range device. Use CPU throttling in DevTools or a real mid-range phone; flagship phones hide slow JavaScript.

For the full pre-launch list, see the mobile website testing checklist.

Frequently asked questions

Is Chrome’s Android emulation accurate?

For layout and most CSS and JavaScript, yes, because Android Chrome uses the same engine. It is less accurate for performance, touch gestures and browser UI, so confirm important flows on a real phone.

How do I open localhost in the Android emulator?

Use 10.0.2.2 in place of localhost, keeping the same port, for example http://10.0.2.2:3000.

Do I need Android Studio just to test a website?

No. Most layout checks work in desktop Chrome. Android Studio is worth installing when you need the real Android browser UI, keyboard behaviour or a specific Android version.

View your next website as mobile.

Add the mobile view Chrome extension and open device previews for the tab you are already working in.