XPath Tester
Test XPath expressions against XML or HTML using your browser's native XPath engine. Live results table.
Examples: //book/title, //*[class=""="x"], //@href, count(//book)
matches
| # | Node | Value |
|---|---|---|
| No matches. | ||
How to use
- 1 Paste XML or HTML source in the textarea.
- 2 Pick the document mode — XML for strict parsing, HTML for lenient tag soup.
- 3 Type an XPath expression. Results update live.
- 4 Copy the matching node list as TSV.
Why use this tool
- Uses your browser's native <code class="font-mono text-xs">document.evaluate</code> — no external dependency.
- Switch between XML and HTML parsers in one click.
- Live results — no submit button.
- Pure client-side — your document stays in your browser.
Frequently asked questions
Which XPath version is supported?
XPath 1.0 — the version implemented natively by browsers. XPath 2.0/3.0 features (regex, sequences, types) are not supported.
Why does my HTML query return nothing?
HTML mode wraps your fragment in <code class="font-mono">html/body</code>. Adjust expressions accordingly (e.g. <code class="font-mono">//body//div</code>).
Related tools?
<a class="text-brand-600 hover:underline" href="/jsonpath-tester">JSONPath Tester</a> for JSON queries; <a class="text-brand-600 hover:underline" href="/xml-formatter">XML Formatter</a> to clean XML first.
XPath Tester is a free developer utility by Zerethon Tools. Test XPath expressions against XML or HTML using your browser's native XPath engine. Live results table. Runs entirely in the browser — no signup, no upload.
- Category
- Developer
- Pricing
- Free
- Privacy
- Browser-based
- Signup
- Not required
Privacy
Your data never leaves your browser unless explicitly stated. XPath Tester runs entirely client-side — no server upload, no logging, no tracking of your input.
Related tools
JSON Formatter
Format, validate, and minify JSON online. Free, no signup — your data never leaves your browser.
Open toolSQL Formatter
Format SQL queries online — beautify MySQL, PostgreSQL, SQLite, SQL Server, Oracle, and BigQuery.
Open toolUUID Generator
Generate UUIDs online — v1, v4, v7, and Nil. Bulk generation up to 10,000. Free, no signup.
Open toolPassword Generator
Generate strong, cryptographically random passwords. Configurable length and character sets — runs in your browser.
Open toolBuild, share, and grow on Zerethon Social
Free signup. Earn points, collect achievements, and connect with creators worldwide.