Skip to content
ToolInstant

XPath & CSS Selector Tester

Local

Test XPath and CSS selectors on pasted HTML: match count, highlighted matches, brittle-locator warnings and suggested unique locators for any element you click.

Loading tool…

Ready · Runs in this browser · nothing uploaded

Developer tools · Free · No upload · No sign-up

How to use the xpath & css selector tester for free

  1. 1Paste the page HTML (or open a saved .html file). Scripts in it never run.
  2. 2Type an XPath or CSS selector to see the matches highlighted and any brittleness warnings.
  3. 3Click an element to get id, name, data-testid, CSS and XPath suggestions with a uniqueness check.

Also useful for: xpath tester, css selector tester, xpath checker online, selenium locator finder, test xpath on html, relative xpath generator.

  • Completely free, no account needed
  • Your data never leaves your device
  • Works on desktop and mobile

Frequently asked questions

Is this XPath and CSS selector tester free?+

Yes. Every tool on ToolInstant is free to use with no sign-up and no limits on how often you use it.

Is my data uploaded anywhere?+

No. Everything is processed inside your browser using JavaScript. Your input never leaves your device.

Does it work on mobile?+

Yes. ToolInstant works in any modern browser on phones, tablets and desktops.

Does it test against the live website?+

No. It tests against the HTML you paste, using your browser's own XPath 1.0 and CSS engines. Content that a page builds later with JavaScript isn't in View Source — copy it from DevTools (Copy → outerHTML) instead.

Why is my locator called brittle?+

Absolute paths (/html/body/…), position indexes like [3] or :nth-child, and auto-generated ids or CSS-in-JS class names tend to change when the page changes, which breaks tests.