---
title: "Playwright vs Cypress"
slug: "playwright-vs-cypress"
category: "comparisons"
tags: ["comparisons", "playwright", "cypress", "testing", "e2e", "frontend"]
status: "stable"
last_updated: 2026-05-14
summary: "Pick Playwright for cross-browser coverage and lower flake rates; pick Cypress when DX and time-travel debugging matter more than browser breadth."
related: ["[[coding/testing]]", "[[comparisons/vitest-vs-jest]]", "[[frontend/react]]", "[[frontend/forms]]", "[[howto/set-up-pytest]]", "[[backend/observability]]", "[[coding/python-testing]]"]
---

## Overview

Pick Playwright for any new browser test suite in 2026; the cross-browser story, parallel execution, and auto-waiting semantics make it the default. Pick Cypress when the team has a deep Cypress investment, the developer experience is the deciding factor, or the product is Chromium-only and the time-travel debugger is the moat. The split is concrete: Playwright owns "new test suites and cross-browser products"; Cypress owns "established suites with happy teams." If you are choosing today and there is no existing suite, Playwright is the safe pick.

## When Playwright wins

Playwright is the right pick for any product that ships to more than one browser engine or runs tests at scale.

- Cross-browser: Chromium, Firefox, and WebKit drive in the same API. Cypress added Firefox and WebKit but the support is uneven and the WebKit story arrived late.
- Parallel by default: a single `playwright test` runs across CPU cores and across browsers. Cypress parallelization requires the paid Cypress Cloud or hand-rolled sharding.
- Lower flake rate: auto-waiting plus the "actionability checks" before every interaction eliminate most race-condition flakes that haunted Cypress suites.
- Trace viewer: the post-run trace is a full timeline with DOM snapshots, network, and console. Cypress's time travel is interactive in the runner; Playwright's trace is replayable offline.
- API testing in the same suite: `request.fixtures()` lets you mix HTTP requests with browser assertions. Cypress has `cy.request` but it does not share the auth model.
- Network interception: `route()` patches network at the protocol level; works for any engine. Cypress's network stubbing has historical edge cases on cross-origin.

## When Cypress wins

Cypress is the right pick when DX is the metric and the team is on Chromium.

- Time travel in the runner: every command captures the DOM. Hovering over a step shows the page at that moment. Playwright's UI mode has caught up but Cypress is the original.
- Familiar idioms: `cy.get`, `cy.contains`, `cy.intercept` are widely known. Hiring a Cypress engineer is straightforward.
- Component testing maturity: `cy.mount` for React and Vue components has been stable for years. Playwright component testing is newer.
- Plugin ecosystem: Cypress's plugin catalog (cypress-axe, cypress-real-events, cypress-cucumber) is broader.
- Single-process model: every test runs in one browser tab; debugging is easier than chasing a multi-context Playwright run.
- Custom commands: `Cypress.Commands.add` is the canonical pattern for shared test helpers; many existing test suites depend on it.

## Trade-offs at a glance

| Dimension              | Playwright                       | Cypress                              |
| ---------------------- | -------------------------------- | ------------------------------------ |
| Browser engines        | Chromium, Firefox, WebKit        | Chromium native; Firefox, WebKit limited |
| Parallel execution     | Built-in, free                   | Paid (Cypress Cloud) or manual       |
| Auto-waiting           | Strong; actionability checks     | Strong; built into the API           |
| Flake rate             | Low                              | Medium; improved in v13              |
| Multi-tab and origins  | Native                           | Limited; same-origin model           |
| Network interception   | Protocol-level `route()`         | `cy.intercept`, occasional edge cases |
| Trace and replay       | Offline trace viewer             | Time travel in the runner            |
| Component testing      | Experimental                     | Mature                               |
| API testing            | First-class                      | `cy.request`, separate auth model    |
| Hiring pool            | Growing fast                     | Large, stable                        |
| LLM agent output       | Pattern-matches well             | Pattern-matches well                 |
| License                | Open source (Apache 2.0)         | Open source plus paid cloud          |

## Migration cost

Cypress-to-Playwright is the common move in 2026. Plan it; do not rewrite all at once.

- Cypress to Playwright: codemods cover the easy 60 percent (`cy.get` to `page.locator`, `cy.visit` to `page.goto`). Custom commands and complex network stubs cost real time. Plan one engineer-week per 100 tests.
- Playwright to Cypress: rare; only for teams that hit a Playwright limitation in component testing. Plan two engineer-weeks per 100 tests.
- Coexistence: keep Cypress for component tests, add Playwright for E2E. The two suites run in CI alongside each other; ownership is per-suite.
- Test data: both tools share fixtures and seed scripts; the test data layer rarely needs to change.

## Recommendation

- New E2E suite in 2026: Playwright. See [[coding/testing]].
- Cross-browser product (Chromium, Firefox, Safari): Playwright; only it covers all three.
- Existing Cypress suite that works and the team is happy: stay on Cypress. Migration is not free.
- React component tests with deep history: Cypress component mode. Playwright component is catching up.
- CI parallelism on a budget: Playwright; native sharding without a paid plan.
- API plus browser in one suite: Playwright; the request fixture shares auth.

## Related

- [[coding/testing]]
- [[comparisons/vitest-vs-jest]]
- [[frontend/react]]
- [[coding/python-testing]]
- [[howto/set-up-pytest]]
- [[backend/observability]]
