# Playwright Stealth, Puppeteer Stealth and Undetected Chromedriver Explained

Source: https://www.sneakerdev.com/guides/playwright-and-puppeteer-stealth
Updated: 2026-11-24

> Playwright stealth, puppeteer-extra-plugin-stealth and undetected-chromedriver are open-source add-ons that hide the most obvious signs of browser automation, such as navigator.webdriver and the HeadlessChrome user agent. They help against basic bot checks but not reliably against modern bot managers, which also score IP reputation, deeper fingerprint consistency, automation-protocol side effects and behaviour.

## The short answer

Browser automation frameworks were built for testing, not for blending in. Out of the box, Chrome driven by Puppeteer, Playwright or Selenium announces itself in several ways. Stealth plugins patch the best-known of those tells so that simple bot checks see an ordinary browser.

| Project | Works with | Language | What it does |
|---|---|---|---|
| puppeteer-extra-plugin-stealth | Puppeteer (via puppeteer-extra) | JavaScript / TypeScript | A set of small evasion modules injected into every page |
| playwright-extra + the same stealth plugin | Playwright (Chromium) | JavaScript / TypeScript | Brings the puppeteer-extra plugin system to Playwright |
| playwright-stealth | Playwright | Python | A port of the same JavaScript patches for Python users |
| undetected-chromedriver | Selenium | Python | Patches the ChromeDriver binary and launches Chrome with fewer automation traces |

They are useful, free and easy to try. They are also public, which means bot-management vendors study them just as closely as their users do.

## Why automated browsers are easy to spot

A browser controlled through automation differs from a person's browser in a few predictable ways:

- **`navigator.webdriver` is true.** The WebDriver specification requires automated browsers to expose this flag, and it is the first thing many scripts check.
- **The user agent says "HeadlessChrome".** Older headless Chrome put that string in the user agent and in client hints.
- **Missing or empty browser objects.** Headless builds historically lacked `window.chrome`, reported no plugins or MIME types, or returned odd values for languages and permissions.
- **Rendering differences.** Headless Chrome on a server often reports a software renderer (such as SwiftShader) for WebGL instead of a real GPU, and a screen or window size that no laptop has.
- **Driver artefacts.** ChromeDriver historically injected recognisable variables into the page, and the DevTools Protocol that Puppeteer and Playwright use can leave side effects that scripts can observe.

You can read more about the wider set of signals in our glossary entries on [headless browsers](https://www.sneakerdev.com/glossary/headless-browser) and [browser fingerprinting](https://www.sneakerdev.com/glossary/browser-fingerprinting).

## What the stealth projects patch

### puppeteer-extra-plugin-stealth

The best-known project. It is a collection of independent evasion modules, each targeting one leak: removing the webdriver flag, replacing "HeadlessChrome" in the user agent, faking a plausible plugin list, adding a `window.chrome` object, fixing permission query results, spoofing WebGL vendor strings and more. Installing it is a couple of lines:

```bash
npm install puppeteer puppeteer-extra puppeteer-extra-plugin-stealth
```

```js
const puppeteer = require("puppeteer-extra");
const StealthPlugin = require("puppeteer-extra-plugin-stealth");

puppeteer.use(StealthPlugin());
const browser = await puppeteer.launch();
```

### Playwright stealth

Playwright has no official stealth mode. In JavaScript, the playwright-extra package lets you reuse the same stealth plugin with Playwright's Chromium. In Python, the community playwright-stealth package ports the same patches. The idea is identical: inject scripts before the page's own JavaScript runs so that the properties it reads look normal.

```bash
npm install playwright playwright-extra puppeteer-extra-plugin-stealth
```

```js
const { chromium } = require("playwright-extra");
const stealth = require("puppeteer-extra-plugin-stealth")();

chromium.use(stealth);
const browser = await chromium.launch();
```

### undetected-chromedriver

For Selenium users in Python, undetected-chromedriver takes a different route. Instead of only injecting JavaScript, it modifies the ChromeDriver binary to remove known driver markers and launches Chrome with settings closer to a normal user's browser.

```bash
pip install undetected-chromedriver
```

```python
import undetected_chromedriver as uc

driver = uc.Chrome()
```

Several successors take the idea further by dropping WebDriver entirely and talking to Chrome directly, which removes another class of leaks. The trade-off is a smaller ecosystem and less mature APIs than Selenium, Puppeteer or Playwright.

## Where stealth plugins stop working

Stealth plugins were designed when most bot checks were simple property lookups. Modern bot managers such as Akamai, DataDome, PerimeterX (HUMAN), Kasada and Cloudflare look much deeper, and the plugins leave several gaps:

1. **Patches can be detected themselves.** Overriding a browser property with JavaScript leaves traces: functions that no longer look native, getters on the wrong prototype, or values that disagree between the main page, iframes and web workers. Inconsistency is a stronger signal than any single property.
2. **The automation protocol leaves side effects.** Puppeteer and Playwright control Chrome through the DevTools Protocol. Some of its commands change observable behaviour inside the page, and detection scripts look for those effects.
3. **They do nothing for your IP.** A perfect fingerprint from a flagged datacenter range still scores badly. See [datacenter vs residential proxies](https://www.sneakerdev.com/guides/datacenter-vs-residential-proxies).
4. **They do nothing for behaviour.** Instant clicks, no mouse movement and identical navigation paths are visible regardless of fingerprint.
5. **Maintenance lags.** These are volunteer projects. The puppeteer stealth plugin in particular has seen little maintenance in recent years, while protection vendors ship updates constantly.

Chrome's newer headless mode, which runs the same code as regular Chrome instead of a separate headless implementation, has closed several of the classic gaps on its own. That helps, but it also means many old patches are no longer the deciding factor.

## Stealth plugins vs hosted stealth browsers

When the open-source route stops being enough, teams usually look at commercial [stealth and antidetect browsers](https://www.sneakerdev.com/categories/browsers) or hosted browser APIs.

| | Open-source stealth plugins | Hosted or commercial stealth browsers |
|---|---|---|
| Cost | Free | Subscription or per-session pricing |
| Setup | Add a package to your existing scripts | Connect your framework to a remote browser or use a desktop app |
| Fingerprint quality | Patches a known list of leaks | Real, consistent device profiles, often patched at the engine level |
| Maintenance | Community-driven, sometimes stale | Vendor-maintained against current detection |
| Scale | You run and monitor the browsers yourself | Provider runs the fleet |
| Best for | Testing, light scraping, learning | Protected sites, long sessions, many profiles |

An [antidetect browser](https://www.sneakerdev.com/glossary/antidetect-browser) keeps a separate, stable fingerprint per profile, which matters when you manage many sessions that should not look related. Hosted browser APIs let you keep writing Playwright or Puppeteer code while the provider handles fingerprints, scaling and updates. For high-volume flows that do not need a full browser, a request-based [antibot API](https://www.sneakerdev.com/categories/antibot-api) is often faster and cheaper per request; our guide on [how antibot systems detect bots](https://www.sneakerdev.com/guides/how-antibot-systems-detect-bots) compares the approaches.

## How to evaluate your setup

1. **Check the basics on a fingerprint test page.** Confirm the webdriver flag, user agent, WebGL renderer and languages look normal, and that values match between the main page and workers.
2. **Pair the browser with suitable proxies.** Match proxy location to the browser's timezone and language, and choose [ISP or residential proxies](https://www.sneakerdev.com/guides/isp-vs-residential-proxies) for protected targets.
3. **Test on your real target, not just test pages.** Passing a public fingerprint test does not mean passing a bot manager.
4. **Measure success over time.** Track block rates per day; a setup that works this week may not next week.
5. **Budget for maintenance.** Either you keep patches current, or you pay a provider to.

## Responsible use

Stealth tooling has legitimate uses, from end-to-end testing behind bot protection to monitoring and research. Respect each website's terms of service and rate limits, and follow the laws where you operate. Browse the [browsers category](https://www.sneakerdev.com/categories/browsers) for maintained options, and compare live pricing in the table below.

## Frequently asked questions

### What does Playwright stealth do?

It injects scripts before a page loads to hide common automation tells, such as the navigator.webdriver flag, the HeadlessChrome user agent and missing browser objects, so that simple bot checks see a normal Chrome browser.

### Does puppeteer-extra-plugin-stealth still work?

It still hides basic automation signals and is fine for light use, but it has seen little maintenance in recent years and modern bot managers can detect both its patches and the automation protocol behind it.

### What is undetected-chromedriver?

It is an open-source Python package for Selenium that patches ChromeDriver to remove known driver markers and launches Chrome with fewer automation traces, making Selenium sessions harder to flag than stock ChromeDriver.

### Is Playwright or Puppeteer better for avoiding detection?

Neither is undetectable by default, and both control Chrome through the same DevTools Protocol. Your proxies, fingerprint consistency and behaviour matter far more than the choice of framework.

### When should I use a hosted stealth browser instead?

Consider one when open-source patches no longer pass your target, when you need many long-lived profiles with distinct fingerprints, or when keeping evasions up to date costs more engineering time than a subscription.
