Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk4 min

How to Emulate Mobile Viewports for Chrome Headless Screenshots

Use Chrome Headless window dimensions for quick mobile-sized screenshots; configure device emulation when viewport, pixel ratio, touch, or user-agent behavior matters.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a quick mobile-sized screenshot, set Chrome Headless’s window dimensions with --window-size. To test mobile-specific behavior such as touch input, user-agent detection, or device pixel ratio, use device emulation instead: window dimensions alone do not configure those properties.

Take a screenshot at mobile-like dimensions

Chrome’s Headless documentation shows this basic command:

As an Amazon Associate I earn from qualifying purchases.

chrome --headless --screenshot --window-size=412,892 https://example.com

Replace the URL with the page you want to capture. The command asks Chrome for a screenshot with a 412-by-892 window. These are example dimensions, not the specifications of a particular phone. Chrome’s documentation also shows a historical example using --window-size=412,732. Check the Headless documentation for the Chrome release you use before relying on command-line details: Chrome Headless documentation.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

This is useful for checking how a responsive layout looks at a chosen size. It does not, by itself, reproduce every condition of a mobile browser.

#1 Best Overall
Sale
Motorola Moto g - 2026 | Unlocked | Made for US 4/128GB | 50MP Camera | Pantone Slipstream, Cellular_Phone
  • Universal unlocked. Compatible with all major U.S. carriers, including Verizon, AT&T, T-Mobile and other prepaid carriers.
  • Super-bright, super-smooth 6.7" display. See your screen clearly even outdoors in sunlight, and enjoy seamless views with a fast-refreshing 120Hz display.*
  • AI-powered camera system. Take stunning photos in any light with the 50MP camera**, look your best with a 32MP selfie cam*****, and capture extreme close-ups.
  • Superfast 5G performance. Unleash your entertainment at 5G speed*** with the MediaTek Dimensity 6300 chipset and up to 12GB of RAM with RAM Boost****.
  • Long-lasting battery + TurboPower charging. Power through day after day with a 5200mAh battery, then get hours of power in just minutes.****

Know what a window size does—and does not—emulate

A narrow window sets dimensions for the capture, but mobile rendering may also depend on CSS viewport characteristics, device pixel ratio, user agent, client hints, and touch behavior. If those affect your test, configure device emulation rather than treating --window-size as a complete phone simulation.

Chrome DevTools Device Mode offers presets and custom CSS-pixel dimensions, and can configure properties such as resolution, pixel ratio, touch, and mobile viewport behavior. See Chrome DevTools Device Mode. ChromeDriver also documents mobile emulation settings, including device metrics and user-agent configuration: ChromeDriver mobile emulation.

Choose the right emulation for the screenshot

Use Headless window dimensions for a quick layout check

Choose a width and height that match the responsive case you need to inspect, then capture with --screenshot. This is the simplest option when the question is how the page layout responds to a particular size.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Samsung Galaxy A17 5G Smart Phone 128GB US 1 Yr Manufacturer Warranty Black | Large AMOLED, High-Res Camera, Durable Design, Super Fast Charging, Expandable Storage, Circle to Search, 2025
  • YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
  • LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
  • MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
  • NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
  • BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.

Use device emulation when browser behavior matters

Use DevTools Device Mode or ChromeDriver mobile emulation when the test depends on more than dimensions. Set the CSS viewport size and, when relevant, device pixel ratio, user agent or client hints, and touch behavior. These settings can change resolution-sensitive CSS, window.devicePixelRatio, image selection, or user-agent-dependent rendering.

Use a real device for hardware-dependent results

Device Mode is an approximation, not a mobile device running the page. Google describes it as a “first-order approximation” and notes that it cannot reproduce some hardware-specific behavior, such as the effects of mobile CPU architecture. If that distinction matters, validate with Remote Debugging or on the actual device. See the Device Mode documentation.

Set up a useful comparison

When comparing mobile cases, record the settings that explain the result rather than labeling a capture only with a phone name:

Rank #3
Samsung Galaxy A16 5G 128GB Cell Phone, Unlocked Android Smartphone, Large AMOLED Display, Durable Design, Super Fast Charging, Expandable Storage, US Version, 2025, Blue Black (Renewed)
  • Charger NOT Included, 6.7" Super AMOLED FHD+, 90Hz Refresh Rate, 385 ppi, 800 nits (HBM), 1080x2340px, 5000mAh Battery
  • 128GB, 4GB RAM, microSDXC, Exynos 1330 (5nm), Octa-Core, Mali-G68 MP2 or Mali-G57 MC2 GPU
  • Rear Camera: 50MP, f/1.8 (wide) + 5MP, f/2.2 (ultrawide) + 2MP, f/2.4 (macro), LED flash, panorama, HDR; Front Camera: 13MP, f/2.0, Android 14, up to 6 major Android upgrades, One UI 6.1
  • 3G: HSDPA 850/900/1700(AWS)/1900/2100; 4G LTE: 1/2/3/4/5/7/12/13/14/20/25/26/28/29/30/38/39/40/41/48/66/71, 5G: 2/5/25/41/66/71/77/78 SA/NSA/Sub6/mmWave - Nano-SIM + eSIM
  • US Model – Global Connectivity – Compatible with Most GSM Carriers like T-Mobile, AT&T, MetroPCS, etc. Will Also work with CDMA Carriers Such as Verizon, Straight Talk.
  • CSS viewport width and height: These determine the responsive layout case.
  • Device pixel ratio: Include it when resolution-sensitive CSS, window.devicePixelRatio, or image selection matters.
  • Mobile behavior: Note whether you enabled touch and configured user-agent or client-hint behavior.
  • Capture scope: Decide whether you need the visible viewport or a full-page image; these are different deliverables.
  • Validation method: Use real hardware if the result depends on behavior the emulator cannot reproduce.

There is no single universally correct device profile for every audience. Choose settings to match the behavior you are investigating, and verify the screenshot against that test case.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep virtual screens separate from mobile emulation

Headless Chrome’s virtual screen configuration controls display properties such as origin, size, scale factor, orientation, and work area. Those display settings are not a substitute for configuring browser mobile-emulation properties. Consult the Headless documentation and the relevant emulation documentation for the Chrome version in use.

Avoid applying emulation twice with Lighthouse

Lighthouse has its own screen and user-agent emulation controls. If another layer, such as Puppeteer, has already applied emulation, avoid duplicating it in Lighthouse; its documentation describes when external emulation should be taken into account. See Lighthouse emulation documentation.

Rank #4
Sale
Samsung Galaxy A17 5G Smart Phone 128GB, US 1 Yr Manufacturer Warranty Blue | Large AMOLED, High-Res Camera, Durable Design, Super Fast Charging, Expandable Storage, Circle to Search, 2025
  • YOUR CONTENT, SUPER SMOOTH: The ultra-clear 6.7" FHD+ Super AMOLED display of Galaxy A17 5G helps bring your content to life, whether you're scrolling through recipes or video chatting with loved ones.¹
  • LIVE FAST. CHARGE FASTER: Focus more on the moment and less on your battery percentage with Galaxy A17 5G. Super Fast Charging powers up your battery so you can get back to life sooner.²
  • MEMORIES MADE PICTURE PERFECT: Capture every angle in stunning clarity, from wide family photos to close-ups of friends, with the triple-lens camera on Galaxy A17 5G.
  • NEED MORE STORAGE? WE HAVE YOU COVERED: With an improved 2TB of expandable storage, Galaxy A17 5G makes it easy to keep cherished photos, videos and important files readily accessible whenever you need them.³
  • BUILT TO LAST: With an improved IP54 rating, Galaxy A17 5G is even more durable than before.⁴ It’s built to resist splashes and dust and comes with a stronger yet slimmer Gorilla Glass Victus front and Glass Fiber Reinforced Polymer back.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common mismatches

The screenshot has the right size, but the page still looks desktop-oriented

--window-size controls dimensions; it does not necessarily apply the mobile behavior your test requires. Configure mobile emulation and check the viewport, user agent, and touch settings relevant to the page.

Images or resolution-sensitive styles differ from the expected result

Check the device pixel ratio as well as CSS viewport dimensions. Resolution-sensitive CSS and image selection can respond to pixel ratio, so matching width and height alone may not reproduce the case.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The result differs from a physical phone

Device Mode simulates mobile experience from a desktop or laptop and does not run on mobile hardware. If hardware-specific behavior is in scope, use Remote Debugging or test on the real device.

Best Value
Tracfone Motorola Moto G 2025, 64GB, Saphire Blue (Locked to
  • Carrier: This phone is locked to Tracfone, which means this device can only be used on the Tracfone wireless network. Tracfone plan required, activating is easy, just 3 steps.
  • DISPLAY: Immersive viewing on a 6.7-inch super-bright 120Hz display with powerful stereo speakers and Bass Boost for cinematic entertainment.
  • CAMERA SYSTEM: Advanced 50MP Quad Pixel camera captures sharp, detailed photos and videos in any lighting condition
  • PERFORMANCE: Lightning-fast 5G connectivity paired with a powerful processor and RAM Boost for smooth multitasking.
  • BATTERY LIFE: Long-lasting 5000mAh battery with TurboPower charging technology delivers hours of power in minutes.

Lighthouse results look different from the separately emulated capture

Check whether Lighthouse and the automation layer are both applying emulation. Lighthouse advises against duplicating settings when they have already been applied externally.

Or skip the browser setup

ScreenshotNeo can return a website screenshot with one request. Its cleanup steps accept cookie and consent banners like a visitor and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers identify the page verdict and billing status. It also provides an MCP server with screenshot tools for AI agents.

Here is a cURL request for a screenshot; replace the URL and API key with your own values. See the ScreenshotNeo documentation for request options.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

The free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 screenshots. Sign up for free.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.