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

For an automated screenshot of a website rendered at phone dimensions, use Puppeteer: emulate a device before opening the URL, then capture a screenshot. If you mean recording the browser window the visitor is looking at, use the Screen Capture API instead; it requires a user gesture and permission. These are different jobs, and neither desktop emulation nor browser display capture proves that a site works correctly on a physical phone.

Choose what “capture a mobile website” means

There are two common interpretations:

  • Capture a URL as a mobile-sized page for QA, documentation, or visual regression: run browser automation with a chosen mobile device profile. Puppeteer can set the viewport metrics and user agent, navigate to the page, and save a screenshot or recording.
  • Record the browser surface a person is viewing: ask the person to choose a display or portion of one, then record the returned media stream. JavaScript in an ordinary webpage cannot silently take a screenshot of arbitrary browser content.

Use the first method for repeatable captures of URLs. Use the second only when a person should explicitly share their screen. For final checks of device-dependent behavior, test on an actual phone or use remote debugging.

Capture a mobile-rendered URL with Puppeteer

Puppeteer automates a browser for tasks including screenshots, navigation, and UI interaction. Its device emulation is applied to a browser page; it does not turn the desktop browser process into a physical phone. The essential order is to emulate first and navigate second: the emulation changes the page size, and applying it before navigation avoids starting the visit at the wrong metrics. See the Puppeteer page.emulate() documentation and Chrome for Developers’ Puppeteer overview.

Install and run a screenshot script

In a new Node.js project, install Puppeteer, which downloads a compatible Chrome for Testing browser as part of its usual installation:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Yojaro 4Pack Silicone Suction Phone Case Mount, Silicon Adhesive Smartphones Stand Sticky, Hands-Free Phone Accessories Holder for Selfies and Videos (Black & White & Translucent & Light Pink)
  • 【Strong Adsorption】The inspiration of the silicone phone suction case comes from the adhesive force of the octopus. Each suction cup phone mount is 3.15 inches long and 2.17 inches wide, with 24 independent suction cups providing a stronger and more stable suction force, so you don't have to worry about your phone falling during use.
  • 【Back of Phone Suction Grip】Remove the adhesive film on the phone suction cup and stick it on the phone case. You can then fix the phone on any smooth surface, which is very convenient. (The phone suction cup cannot be removed and reused after being attached to the phone case. It is recommended to attach it to a regular phone case, not a valuable one.)
  • 【Widely Used】Our non-slip silicone phone sticky grip mount attaches to almost any flat phone case and make it compatible with common mobile phones such as iPhone and Android.You can shoot, watch videos or video calls in the kitchen, gym, dance studio, bathroom and other places.
  • 【Capture the Wonderful Picture】Whether you are a TikTok creator or just like to share videos and photos, this phone suction cup can help you hands-free capture wonderful videos and photos for sharing with friends.
  • 【Note】You can fix the phone suction cup on a smooth surface such as a mirror or glass. If necessary, wipe the suction cup with a damp cloth to obtain stronger suction. Before releasing your hand, make sure the phone is firmly fixed. (Not applicable to rough walls, wooden surfaces, and other uneven surfaces)
npm install puppeteer

Save the following as capture-mobile.mjs and run it with node capture-mobile.mjs. The example uses Puppeteer’s current documented KnownDevices entry for “iPhone 17 Pro.” Device names and APIs can change, so check the installed Puppeteer version if that profile is unavailable.

import puppeteer, { KnownDevices } from "puppeteer";

const browser = await puppeteer.launch();
try {
  const page = await browser.newPage();
  await page.emulate(KnownDevices["iPhone 17 Pro"]);
  await page.goto("https://example.com", { waitUntil: "networkidle2" });
  await page.screenshot({ path: "mobile.png", fullPage: true });
} finally {
  await browser.close();
}

The resulting mobile.png is a static, full-page screenshot. Change the URL and output path to suit your task. fullPage: true captures the full document rather than just the currently visible viewport; omit it when you want a viewport-only image.

Wait for the state you want to document

networkidle2 waits for a period with no more than two active network connections, but it is not a guarantee that all visible content has finished changing. Analytics, polling, lazy-loaded images, animations, and client-side rendering can make network-idle behavior misleading. For a page with a known ready signal, wait for it explicitly after navigation:

await page.goto("https://example.com", { waitUntil: "domcontentloaded" });
await page.waitForSelector("main[data-ready='true']");
await page.screenshot({ path: "mobile.png", fullPage: true });

Replace the selector with an element or state that actually means your target page is ready. If the content appears only after scrolling, scroll through the page before taking a full-page capture so lazy-loaded elements have an opportunity to load. A fixed delay can be used when no reliable readiness signal exists, but it is less robust than waiting for a specific condition.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Apple EarPods Headphones with USB-C Plug, Wired Ear Buds with Built-in Remote to Control Music, Phone Calls, and Volume
  • SUPERIOR COMFORT — Unlike traditional circular ear buds, the design of EarPods is defined by the geometry of the ear. Which makes them more comfortable for more people than any other ear bud–style headphones.
  • HIGH-QUALITY AUDIO — The speakers inside EarPods have been engineered to maximize sound output and minimize sound loss, which means you get high-quality audio.
  • BUILT-IN REMOTE — EarPods with USB-C plug also include a built-in remote that lets you adjust the volume, control the playback of music and video, and answer or end calls with a pinch of the cord.
  • COMPATIBILITY — Works with all devices that have a USB-C port.
  • INTEGRATED MICROPHONE — A built-in microphone precisely captures your voice while you’re on the phone, taking a FaceTime call, or summoning Siri — so you’re always heard loud and clear.

Record a mobile-emulated interaction

For a motion capture, Puppeteer’s page.screencast() returns a recorder. Current Puppeteer documentation says recordings default to WebM with VP9 at 30 FPS and require FFmpeg. Navigate and perform the flow you intend to record before stopping the recorder:

const recorder = await page.screencast({ path: "mobile.webm" });
// Interact with the page or run the flow you want to document.
await recorder.stop();

Use a screenshot when a still image is enough; a recording adds a dependency and produces a larger moving artifact. Check the Puppeteer screencast documentation for requirements and behavior for your installed version.

Record the visible browser surface with JavaScript

If your webpage should let a visitor record a screen or browser tab, call navigator.mediaDevices.getDisplayMedia() in response to a click. The browser prompts the user to select a surface and returns a MediaStream if permission is granted. This API requires a secure context, such as HTTPS, and is not supported in every browser. Surface selection and audio behavior vary by browser. See MDN’s getDisplayMedia() reference.

This example records video without audio, downloads the recording when it stops, and stops when the user ends sharing:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
PopSockets Adhesive Phone Grip, Holder- Black
  • Secure Hold: Our PopSockets adhesive phone grip gives your cell phone a secure, comfortable hold in hand to help prevent drops while texting, taking photos, or scrolling on the go. Designed to stick firmly to most phone cases and devices.
  • Hands-Free Made Easy: Easily turn your PopSocket into a phone stand to prop up your phone anywhere — perfect for watching videos, video calls, or following recipes. A must-have phone holder that keeps your device secure and ready for anything.
  • Compatibility: Works with all phones, tablets, and Kindles. Sticks best to smooth, hard plastic cases and may not adhere to silicone or textured cases. Easily swap your PopTop to change up your style — just close the grip, press down, twist 90°, and snap on a new top.
  • Black PopSockets: Simple, refined, and endlessly versatile — a timeless essential for any phone.
  • PopSockets Ecosystem: Mix and match your favorite PopSockets products — from grips and wallets to cases and mounts — all designed to work together seamlessly.
<button id="start">Choose a screen to record</button>
<script>
const button = document.querySelector("#start");

button.addEventListener("click", async () => {
  let stream;
  try {
    if (!navigator.mediaDevices?.getDisplayMedia) {
      throw new Error("Screen capture is not available in this browser.");
    }

    stream = await navigator.mediaDevices.getDisplayMedia({
      video: { displaySurface: "browser" },
      audio: false
    });

    const recorder = new MediaRecorder(stream);
    const chunks = [];

    recorder.addEventListener("dataavailable", (event) => {
      if (event.data.size) chunks.push(event.data);
    });

    recorder.addEventListener("stop", () => {
      const blob = new Blob(chunks, { type: recorder.mimeType || "video/webm" });
      const url = URL.createObjectURL(blob);
      const link = document.createElement("a");
      link.href = url;
      link.download = "mobile-capture.webm";
      link.click();
      setTimeout(() => URL.revokeObjectURL(url), 1000);
      stream.getTracks().forEach((track) => track.stop());
    }, { once: true });

    stream.getVideoTracks()[0].addEventListener("ended", () => {
      if (recorder.state !== "inactive") recorder.stop();
    }, { once: true });

    recorder.start();
  } catch (error) {
    console.error("Capture was cancelled or unavailable", error);
    if (stream) stream.getTracks().forEach((track) => track.stop());
  }
});
</script>

The browser may reject a request, the user may cancel the picker, or the user may stop sharing. Treat those as normal outcomes, not as a reason to try to capture without consent. If you need audio or a different surface, check the target browsers’ supported options and test them directly; do not assume a requested surface or audio track will be available everywhere. The returned stream can also be sent over WebRTC instead of recorded locally.

Emulation is not the same as testing on a phone

Desktop device emulation is useful because it is fast and scriptable, but its viewport and user-agent settings are simulations. Microsoft Edge describes Device Emulation as a “first-order approximation” and says it “doesn’t actually run your code on a mobile device.” For the most robust testing, Edge recommends running the page on a mobile device. Read Microsoft Edge’s Device Emulation documentation.

Check Desktop device emulation Real device or remote debugging
Setup and repeatability Fast and scriptable for repeatable screenshot runs. Requires a connected device or access to a remote device.
Viewport and user agent Simulated through the selected profile. Uses the target device’s native values.
CPU, browser engine, sensors, permissions Approximate or absent; does not reproduce every device behavior. Lets you observe behavior on the target device and browser.
Best fit Broad screenshot and visual regression checks. Final compatibility, input, permission, and performance checks.

Use emulation to catch layout changes across profiles, then verify issues involving touch input, OS permissions, sensors, fonts, browser engines, or performance on the relevant physical device. A screenshot alone cannot establish that a mobile interaction works.

Or skip the browser setup

If your goal is a URL screenshot rather than browser automation practice, ScreenshotNeo is a website screenshot API and MCP server. One GET request returns a PNG, JPEG, WebP, or PDF. For example, save the response as WebP with cURL:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
360° Rotating Stainless Steel Phone Tether Tab (Silvery 3-Pack) - Universal for iPhone & Other Phones (Fits Wristbands/Necklaces/Crossbody Straps)
  • [360 ° Flexible Rotation Design] Comes with a rotatable lanyard ring that supports 360 ° free rotation, effectively solving the problem of twisted and tangled lanyards
  • [Wide compatibility] The ultra-thin 0.02-inch design does not block the charging port at all, and both wired and wireless charging can be used directly without removing the pad. Compatible with most smartphones such as iPhone, compatible with various wristbands, lanyards, crossbody straps, and keychains
  • [Durable and Portable Material] Premium rust-resistant stainless steel material with good flexibility, which not only avoids scratching the phone case, but also has excellent anti rust and anti fading performance
  • [Multi scenario Practical] Paired with a lanyard or wristband, hands-free use can be achieved. The phone is within reach and not easily dropped, ideal for daily commuting and outdoor activities. Suitable for full coverage phone cases, does not support half coverage phone cases
  • [Quality Service] If you find any damage or other issues with the product upon receipt, please contact us immediately. We will handle it quickly
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

See the ScreenshotNeo API documentation for authentication and request options. Its clean-shot steps can accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents and MCP clients. The free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 shots.

Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month with no card.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting capture failures

Puppeteer reports that the device profile is undefined

The installed Puppeteer version may not include the named profile, or the profile name may not match exactly. Check the KnownDevices entries available in that version and use a supported name. Keep the Puppeteer version pinned or reviewed in automated pipelines so a dependency update does not silently change the profile or API behavior.

The screenshot is blank or misses late content

Navigation completion and network idle do not always mean that a single-page app has rendered its final view. Wait for a page-specific selector or readiness state, and check that the target element is visible before capturing. If images load as the visitor scrolls, scroll through the page before the full-page screenshot.

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

The capture looks mobile-sized but behaves unlike a phone

Emulation does not reproduce every mobile CPU, browser engine, permission, sensor, font, or hardware characteristic. Use remote debugging or test on the actual phone and browser when the behavior depends on one of those features.

Best Value
Anteel 2 Pack Silicone Suction Cup Phone Case Mount Double Sided, Hands-Free Silicon Phone Grip with Higher Suction Power for Selfies and Videos, Non Slip Phone Accessories (LightPink&White)
  • 【PKYAA Double Sided Silicone Suction Phone Case Mount】PKYAA With Double Sided 40 Strong and Reliable individual suction cups, PKYAA provides a thicken and upgraded universal silicon suction mount for your phone.
  • 【Friendly to Content Creators】If you are a content creator or an online influencer, you can create videos anywhere with this suction mount completely hands free with this silicone cell phone mount for cases.
  • 【HANDS-FREE & Adhere to Mirrors】This Double Sided silicone suction phone case mount allows you to stick your phone to the mirror easily. No longer holding your phone in one hand to watch video tutorials while making up.
  • 【Strong Grip on the Smooth Surface】You can easily hang your phone anywhere with a smooth surface. All you do is you clean off your phone and smooth surface. It is STURDY and it not only sticks to mirrors, it also sticks to windows, it sticks to refrigerators, tiles and other clean, flat surfaces.
  • 【Press Down Firmly Every 30 Minutes】Use your palm or fingers to press the phone down firmly and check it's secure before letting go. Apply even pressure for a few seconds to allow the suction cup to adhere properly. To maintain the grip and prevent accidental falls, it's a good practice to periodically reapply pressure to the suction cup.

getDisplayMedia() rejects or the chooser does not appear

Confirm the page is served from a secure context and invoke the API directly from a user action such as a button click. Check that the browser supports the API, then handle permission denial or cancellation in the rejected promise. You cannot bypass the user’s choice.

The screen recording will not start or download

Check that the browser supports MediaRecorder and that the selected capture produced a video track. Wait for the recorder’s stop event before building the download, because encoded chunks arrive asynchronously. Revoke the object URL only after initiating the download, and stop the stream’s tracks when recording ends.

Puppeteer screencast fails to record

Verify FFmpeg is available as required by the current Puppeteer screencast documentation. Also confirm the browser process remains open while recording and that the recorder is stopped before closing the browser.

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.

Privacy, reliability, and cost considerations

  • Protect captured data: screenshots and recordings can contain anything visible to the browser session, including account information and secrets. Use a test account and avoid exposing private data in saved artifacts or logs.
  • Make automated runs reproducible: pin or review Puppeteer versions, use explicit device profiles and readiness conditions, and keep output names predictable. Network idle alone may be unreliable on pages with persistent connections or dynamic rendering.
  • Account for the browser environment: local Puppeteer captures depend on browser installation, available memory, network access, and any dependencies required for recording. A failed load should not be mistaken for a valid screenshot.
  • Choose capture scope intentionally: full-page images can be much taller and larger than a viewport capture. Prefer the smallest artifact that answers the QA or documentation question.
  • Know what you pay for: self-hosted Puppeteer has no per-shot API charge, but it uses your own compute and maintenance time. A hosted API trades setup for a service plan; for ScreenshotNeo specifically, the listed free allowance is 1,000 shots per month and the lowest paid plan is $5 for 3,000.

Frequently Asked Questions

Can JavaScript take a screenshot of a visitor’s phone screen without asking?

No. The Screen Capture API requires the browser’s surface picker and user permission; a webpage cannot silently capture the visitor’s display.

Does Puppeteer’s phone profile run a real iPhone browser?

No. It applies emulated device metrics and a user agent in a browser process; use an actual device or remote debugging for device-specific verification.

Can I use Puppeteer for a video instead of a still image?

Yes. Puppeteer’s screencast API records browser activity to WebM by default, and the current documentation says FFmpeg is required.

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.

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