GuidesIntermediate

Playwright Stealth in 2026: Beat Bot Detection With Mobile Proxies

What Playwright stealth patches, why it still gets detected in 2026, and how Patchright, Camoufox and mobile proxies fix the leaks it can't reach.

VoidMob Team
13 min read
A browser console listing stealth checks for navigator.webdriver, languages, timezone, plugins and WebGL, with a Mobile IP indicator

Playwright stealth means hiding the signals that tell a website your browser is automated. To do that, the playwright-stealth package ships 19 patches for signals such as navigator.webdriver, the plugin list and the WebGL vendor. In 2026 that alone rarely gets past a serious anti-bot, because the biggest giveaways sit below JavaScript: the Chrome DevTools Protocol, the headless build, the TLS handshake and the IP address. Below: what Playwright stealth does, why it gets detected, the tools that fix the deeper leaks, and how to plug a mobile proxy into the stack.

Key takeaways

  • playwright-stealth (Python, 2.0.3) and playwright-extra with the stealth plugin (Node.js) patch JavaScript-level signals like navigator.webdriver, plugins and WebGL vendor.
  • Its own README warns it won't bypass anything but the simplest bot detection. The CDP Runtime.enable leak, headless builds, TLS and IP reputation are out of its reach.
  • Patchright and rebrowser-patches fix the Runtime.enable leak inside Playwright itself. Camoufox moves the fingerprint into a patched Firefox build.
  • Use an HTTP proxy with credentials, one sticky IP per browser context, and match timezone and locale to the exit country.
  • Mobile carrier IPs hold up best on strict targets. Residential works on lighter ones, and datacenter IPs usually fail before stealth patches matter.

What Does Playwright Stealth Do?

Stealth patches rewrite the browser properties that automation changes, before any page script runs. Version 2.0.3 of the Python package playwright-stealth, released April 2026, ships these evasions, each one an init script you can switch on or off:

  • Automation flags: navigator.webdriver, the user agent and its client hints (sec-ch-ua), and navigator.userAgentData
  • Browser identity: navigator.vendor, navigator.platform, languages, plugins, hardware concurrency, permissions and media codecs
  • Chrome objects: chrome.app, chrome.csi, chrome.loadTimes and chrome.runtime (off by default), which headless builds leave empty
  • Rendering details: the WebGL vendor and renderer, the hairline check, iframe contentWindow and the Error prototype

It's a fork of a Python port of the Puppeteer stealth plugin, and the maintainer is candid about its limits: the README says "Don't expect this to bypass anything but the simplest of bot detection methods" and calls the project "a proof-of-concept starting point".

Playwright Stealth in Python

In Python, the playwright_stealth package wraps the Playwright context manager, so every page it creates gets the patches. Set the languages and platform to match the proxy's country and the operating system your user agent reports:

stealth_python.py
1# pip install playwright playwright-stealth && playwright install chromium2import asyncio3from playwright.async_api import async_playwright4from playwright_stealth import Stealth5 6PROXY = {"server": "http://proxy.voidmob.com:10000",  # a proxy list set to Sticky7       "username": "<list-username>", "password": "<list-password>"}8 9stealth = Stealth(10  navigator_languages_override=("en-US", "en"),11  navigator_platform_override="Win32",  # match the OS your user agent reports12)13 14async def main():15  async with stealth.use_async(async_playwright()) as p:16      browser = await p.chromium.launch(headless=False, proxy=PROXY)17      context = await browser.new_context(locale="en-US", timezone_id="America/New_York")18      page = await context.new_page()19      await page.goto("https://www.example.com/")20      print("webdriver:", await page.evaluate("navigator.webdriver"))21      await browser.close()22 23asyncio.run(main())

Sync code works the same way through Stealth().use_sync(sync_playwright()). One gap to know: making it work with launch_persistent_context is still on the README's to-do list.

Playwright Stealth Mode in Node.js

In Node.js, the usual route is the Puppeteer stealth plugin, loaded through playwright-extra. It still works for basic checks, but it hasn't shipped a new release since 2023:

stealth_node.js
1// npm i playwright playwright-extra puppeteer-extra-plugin-stealth2const { chromium } = require('playwright-extra')3const stealth = require('puppeteer-extra-plugin-stealth')()4 5chromium.use(stealth)6 7;(async () => {8const browser = await chromium.launch({9  headless: false,10  proxy: {11    server: 'http://proxy.voidmob.com:10000', // a proxy list set to Sticky12    username: '<list-username>',13    password: '<list-password>',14  },15})16const context = await browser.newContext({ locale: 'en-US', timezoneId: 'America/New_York' })17const page = await context.newPage()18await page.goto('https://www.example.com/')19console.log('webdriver:', await page.evaluate(() => navigator.webdriver))20await browser.close()21})()

Why Playwright Stealth Is Not Working: 4 Leaks It Can't Patch

When a stealth-patched Playwright browser still gets flagged, the cause is usually one of four signals that JavaScript patches can't reach. Anti-bots are common enough that this matters on ordinary targets: Zyte's State of Web Access 2026 found an identifiable anti-bot service on 18.5% of the 11,100 landing pages it sampled.

The CDP Runtime.enable Leak

Playwright controls Chrome through the DevTools Protocol, and it calls Runtime.enable on every frame to run its scripts. According to the rebrowser-patches README, a detection technique used by major anti-bots, Cloudflare and DataDome among them, runs a few lines of JavaScript that fire only when that command has been used. A second Playwright CDP leak is the name of its internal UtilityScript helper, which a page can read from an error's stack trace.

No init script can hide a protocol call, which is why stealth plugins can't fix it. Instead, Patchright and rebrowser-patches patch Playwright's own source, so the command is never sent the detectable way.

Out of the box, Playwright launches Chromium with automation flags, so navigator.webdriver reports true unless something removes it. Stealth patches the property; Patchright removes the cause by launching without the --enable-automation flag and with --disable-blink-features=AutomationControlled. To get navigator.webdriver false in plain Playwright, pass that same flag in args.

Headless mode adds more signals. Playwright's default headless shell and Chrome's new headless mode, which Playwright's docs say you opt in to with channel="chromium", both still put "HeadlessChrome" in the user agent, and servers without a GPU render WebGL through a software renderer such as SwiftShader. A visible window on a virtual display, with channel="chrome", is still the closest to a real user. Client hints and device emulation need the same care, and our Playwright proxy setup for Cloudflare walks through a full config that keeps them in line with a carrier IP.

Browser and TLS Fingerprinting

Anti-bot fingerprinting reads canvas, WebGL, fonts and audio together and checks that they agree with the user agent and platform. Patching one property while the rest describe a Linux server creates a mismatch of its own.

The Playwright TLS fingerprint is the handshake of the Chromium build you launch. That's fine on its own, but a user agent claiming a different Chrome version or operating system than the binary contradicts it, a check our JA3 vs JA4 breakdown covers in depth.

The IP Address

No patch changes where the traffic comes from. Detection starts with the IP: datacenter and cloud ranges get challenged before the browser fingerprint is even read, and a residential or mobile IP in the wrong country contradicts the timezone and locale. That's the layer the proxy section below fixes.

Playwright Stealth Alternatives in 2026

Four tools go further than the stealth plugin. Here is how they compare:

ToolLanguageHow it worksFixes Runtime.enableBest for
playwright-stealth / playwright-extraPython / Node.jsJavaScript init scriptsNoLight protection, quick fixes
rebrowser-patchesNode.js, PythonPatches Playwright and Puppeteer sourceYesKeeping existing Playwright code
PatchrightPython, Node.js, .NETDrop-in patched Playwright buildYesMost scraping on Chromium
CamoufoxPythonPatched Firefox, fingerprints set in C++Not applicable (Firefox)Strict fingerprinting
nodriverPythonDrives Chrome over CDP, no WebDriverAvoids Playwright's pathAsync Python, not Playwright code

Patchright: Undetected Playwright

Patchright is a drop-in Playwright build for Chromium that fixes the Runtime.enable leak by running scripts in isolated contexts, turns off the Console API to close the console leak, and removes the automation flags. Its README lists Cloudflare, Kasada, Akamai, DataDome and Fingerprint.com among the systems it passes, and recommends a persistent profile, the Chrome channel, a visible window and no custom headers or user agent. Patchright Python keeps Playwright's API, so switching existing code only changes the import:

patchright_mobile.py
1# pip install patchright && patchright install chrome2from patchright.sync_api import sync_playwright3 4PROXY = {"server": "http://proxy.voidmob.com:10000",  # a proxy list set to Sticky5       "username": "<list-username>", "password": "<list-password>"}6 7with sync_playwright() as p:8  ctx = p.chromium.launch_persistent_context(9      user_data_dir="profiles/profile-1",  # one profile per sticky IP10      channel="chrome",11      headless=False,12      no_viewport=True,13      proxy=PROXY,14  )15  page = ctx.new_page()16  page.goto("https://www.example.com/")17  print("webdriver:", page.evaluate("navigator.webdriver"))18  ctx.close()

Each Patchright profile works best with one sticky IP, the setup our PerimeterX bypass guide uses against HUMAN's session scoring.

Camoufox With Playwright

Camoufox is a Firefox fork that sets fingerprints in the browser's C++ code rather than through injected JavaScript, and it accepts Playwright code, so a Camoufox Playwright script only changes the launch. Its geoip option looks up the proxy's exit IP and sets the timezone, locale, location and WebRTC address to match, which pairs well with a mobile proxy:

camoufox_mobile.py
1# pip install -U "camoufox[geoip]" && python -m camoufox fetch2from camoufox.sync_api import Camoufox3 4with Camoufox(5  geoip=True,      # timezone, locale and WebRTC IP follow the proxy exit6  humanize=True,   # human-like cursor movement7  proxy={"server": "http://proxy.voidmob.com:10000",  # a proxy list set to Sticky8         "username": "<list-username>", "password": "<list-password>"},9) as browser:10  page = browser.new_page()11  page.goto("https://www.example.com/")12  print(page.title())

Nodriver vs Playwright

nodriver, the successor to undetected-chromedriver, drives Chrome directly over CDP without WebDriver or Selenium. It's fully async, Python only, and uses its own API, so Playwright scripts need rewriting. It suits new Python projects that want to stay off Playwright's automation path. Proxy credentials take extra work there, since Chrome's --proxy-server flag carries no username or password. If your code is already Playwright, Patchright gets similar results with a one-line change.

Add a Mobile Proxy to Your Playwright Stealth Stack

A Playwright mobile proxy setup follows four rules, and our Playwright proxy setup guide shows the first two in code:

  1. Use HTTP for credentials. Playwright refuses a SOCKS5 proxy with a username and password ("Browser does not support socks5 proxy authentication"), so pass authenticated proxies as http://.
  2. One sticky IP per context. Each browser context is one visitor, so give it one IP for its whole life and rotate between contexts, never inside one.
  3. Match timezone and locale to the exit. Set timezone_id and locale per context, or let Camoufox's geoip do it.
  4. Match the operating system. Platform, user agent and fonts should all describe the same OS as the network fingerprint.

VoidMob mobile proxies run on real 4G and 5G carrier IPs with a 95%+ trust score. One package holds up to 100 proxy lists, each with its own credentials, country targeting and rotation setting, so every Playwright context can have its own list. Set each list to Sticky: a new list rotates per request by default, which would change the IP inside a context. Lists take HTTP and SOCKS5 on the same host and port, and Playwright uses the HTTP side with credentials. On dedicated devices, every Premium plan and Standard plans tagged p0f let you set the p0f TCP fingerprint to an OS such as Windows, macOS, iPhone or Android, so the network layer matches the browser you claim.

A browser downloads every script, image and font on a page, so Playwright scraping uses far more data than an HTTP client. Estimate it before you pick a plan:

Proxy data usage calculator

Rough estimate, not a billing forecast. Real usage varies by target, media mix and caching.

Use case

About 60 MB per hour per account, over 30 days.

Rough estimate
~18GB/mo
Fits the 25 GB tier at $81.25/moSized with 20% headroom over the estimate.
See proxy pricing

Prices updated

Best Proxies for Playwright Scraping: Mobile vs Residential

The best proxy for Playwright is the one that keeps a session's IP believable for as long as the browser context lives. Whether to pick mobile proxies or residential proxies for Playwright depends on the target:

FactorDatacenterResidentialMobile
IP sourceServer rangesHome ISP connections4G and 5G carrier networks
How anti-bots score itChallenged before stealth mattersTrusted when fresh and geo-matchedShared by many real phone users, so blocks are costly
Session fitStable, but flaggedDepends on the pool's sticky supportSticky lists or dedicated mobile devices
FitsUnprotected sites and testingModerate protection at volumeCloudflare, DataDome, HUMAN and other strict targets

Residential proxies handle plenty of Playwright work, especially on lightly protected sites. Mobile proxies earn their price on strict targets and long sessions, where one burned IP costs a whole browser profile.

How to Test Your Playwright Stealth Setup

Check the stack before you point it at a real target. A setup that passes Playwright anti-bot detection should show:

  • navigator.webdriver returns false, and the user agent has no "HeadlessChrome"
  • the WebGL renderer names a real GPU, not a software renderer
  • timezone, language and IP country agree in a location consistency test
  • WebRTC shows the proxy's IP, not your server's, in a WebRTC leak test
  • canvas, fonts and WebGL look like one ordinary device in a browser fingerprint test

Mobile proxies for Playwright

Real 4G and 5G carrier IPs with sticky sessions per browser context and dedicated mobile devices.

FAQ

What does Playwright stealth do?

It injects scripts before page load with 19 patches, 18 of them on by default, for the browser properties automation changes, including navigator.webdriver, the user agent and client hints, plugins, languages, the chrome.app object and the WebGL vendor. It doesn't change the DevTools Protocol calls, the TLS handshake or the IP address.

Can websites detect Playwright?

Yes. Out of the box, Playwright reports navigator.webdriver as true, and headless runs put HeadlessChrome in the user agent. Stealth patches hide those, but the CDP Runtime.enable leak, the TLS fingerprint and the IP address stay visible to anti-bots that check them.

Why is Playwright stealth not working?

Usually because the detection happens below JavaScript. The CDP Runtime.enable leak, headless rendering, a user agent that contradicts the TLS fingerprint, and a datacenter IP all give Playwright away. Switch to Patchright or rebrowser-patches, run a visible browser and use a sticky mobile or residential IP.

How do I make navigator.webdriver false in Playwright?

Launch Chromium with the --disable-blink-features=AutomationControlled argument, use the playwright-stealth package, or run Patchright, which removes the automation flags by default. Check the result with page.evaluate('navigator.webdriver').

Is Patchright better than playwright-stealth?

For protected sites, yes. playwright-stealth only patches JavaScript properties, while Patchright fixes the Runtime.enable and Console leaks inside Playwright itself and lists Cloudflare, Kasada, Akamai and DataDome among the systems it passes. Support is Chromium only.

Nodriver vs Playwright: which is better for scraping?

nodriver avoids WebDriver and drives Chrome over CDP, which helps against detection, but it's Python only with its own async API. If you already have Playwright code, Patchright gives similar stealth without a rewrite.

Should I use mobile or residential proxies for Playwright?

Residential proxies work for lightly protected sites when they're fresh and geo-matched. Mobile proxies hold up best on strict anti-bots and long sessions, because carrier IPs are shared by many real users. Either way, use one sticky IP per browser context.

In 2026, Playwright stealth is a stack, not a plugin. Patch what JavaScript can reach, fix the protocol leaks with Patchright or rebrowser-patches, run a visible browser, and give every context its own sticky carrier IP with a timezone and locale to match. Skip any layer and the others can't make up for it.