XPath & CSS Selector Tester | ContextQA
All free tools XPath & CSS Selector Tester

Free XPath & CSS Selector Tester

Paste your HTML, test an XPath or CSS selector against it, and see exactly what it matches — plus a stability score and ready-to-paste Selenium, Playwright, Cypress and WebdriverIO code. Nothing you paste here leaves your browser.

HTML source paste any page markup
Rendered preview matches highlighted
Matched elements
Enter a selector to see what it matches.
Selector stability score how likely this locator is to survive a UI change
Stable /100
Use it in your test

Try:

How this XPath and CSS selector tester works

Your markup is parsed into an isolated, in-memory document using the browser's own DOMParser, then matched with the native querySelectorAll (for CSS) or document.evaluate (for XPath). Because both are the same engines Chrome runs on a real page, a selector that matches here matches in your test run.

The preview pane renders your HTML inside a fully sandboxed iframe with scripting disabled, and any