Free tools

Free JSONPath & XPath Tester

Test JSONPath and XPath expressions against real payloads for deterministic extraction and API validation workflows.

Copy-paste outputs

Win high-intent buyers from ChatGPT, Gemini, Claude, Perplexity, and AI Overviews before your competitors do.

One operating layer for monitoring, measurement, content action, and technical cleanup.

AI Visibility TrackingCompetitive RankingSentiment by ModelSource CitationsAI Overviews TrackingPrompt MonitoringAI Visibility TrackingCompetitive RankingSentiment by ModelSource CitationsAI Overviews TrackingPrompt Monitoring
Content GapsAI InsightsAdvanced AnalyticsData CopilotBlog GenerationUGC CampaignsLLM CouncilContent GapsAI InsightsAdvanced AnalyticsData CopilotBlog GenerationUGC CampaignsLLM Council
Shopping IntelligenceCrawler MonitoringGEO OptimizationMulti-Brand ManagementShopping IntelligenceCrawler MonitoringGEO OptimizationMulti-Brand Management

Tool 01

JSONPath / XPath Tester

Test JSONPath and XPath extraction rules against payloads with deterministic outputs.

JSONPath / XPath Tester
Evaluate extraction expressions against pasted JSON or XML payloads.
Result
0 match(es)
// Expression results will appear here

How it works

JSONPath / XPath Tester: methodology and worked example

How this tool computes its result

JSONPath mode parses the input with `JSON.parse` and evaluates the expression with the `jsonpath-plus` library's `JSONPath({ path, json })`, returning an array of matches. XPath mode parses the input as XML with the browser's `DOMParser` (throwing "Invalid XML input." if a `parsererror` node appears), then runs `document.evaluate(expression, doc, null, XPathResult.ANY_TYPE, null)`. Depending on the result type returned by the browser, it pushes a single number, string, or boolean, or iterates node results with `iterateNext()` collecting each node's `textContent`.

Worked example

JSONPath mode: input `{"items":[{"name":"Brand Armor AI"},{"name":"Acme"}]}` with expression `$.items[*].name` returns 2 matches: `["Brand Armor AI","Acme"]`. XPath mode: input `<items><item><name>Brand Armor AI</name></item></items>` with expression `//item/name/text()` returns 1 match: `["Brand Armor AI"]`.

When not to use this tool

XPath evaluation depends on the browser's XML parser and `document.evaluate`, so it only works on well-formed XML, not arbitrary HTML — tag soup that a browser would silently repair in an HTML context throws a parse error here. It is also not a JSON Schema or XML Schema validator; it only reports what an expression matches, not whether the document is structurally valid.

Common mistakes

  • - Leaving JSON content in the input box after switching to XPath mode (or vice versa) — the wrong parser runs against it and throws immediately rather than auto-detecting the format.
  • - Writing an XPath expression without a trailing `text()` — it returns Element nodes whose `textContent` can include nested whitespace instead of the clean string value.
  • - Referencing a top-level array in JSONPath without the leading `$.` — this silently returns zero matches rather than an error, which can look like the data is missing.

Ready to dominate AI search visibility?

Track where your brand shows up in AI answers, close the content gaps that cost conversions, and stay visible across ChatGPT, Claude, Gemini, Perplexity, and Grok.