XPath & CSS Selector Helper

Generate candidate CSS/XPath selectors from HTML and test a selector against a pasted HTML snippet.

Paste HTML to generate or test selectors.

How to use XPath & CSS Selector Helper

Paste an HTML snippet. Generate candidates from the first element, or enter your own CSS/XPath selector and test how many elements it matches. This is a browser-side helper; a selector that matches your snippet can still behave differently in a live application with iframes, shadow DOM or dynamic rendering.

Privacy

This tool runs locally in your browser. The values you paste or generate do not need to be sent to ToolHyv to perform the task.

Frequently asked questions

Does this connect to my live website?

No. It evaluates only the HTML snippet you paste into the tool.

Will generated selectors always be stable?

No. Prefer stable application-owned attributes such as id, name or data-testid. Generated class/text selectors should be reviewed before adding them to an automation suite.

Can it test XPath?

Yes. Choose XPath and the browser evaluates the expression against the pasted HTML document.