Free tools

Free JSONPath & XPath Tester

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

Copy-paste outputs

The autonomous growth engine for your business.

Brand Armor AI finds where your customers are, decides what to create, distributes it across the channels that matter, and learns from every result.

Discover customer opportunitiesPlan campaignsCreate posts, images, and videosPublish across channelsMeasure what worksAI search visibilityDiscover customer opportunitiesPlan campaignsCreate posts, images, and videosPublish across channelsMeasure what worksAI search visibility
Social publishingBlog and CMS deliveryEmail outreachAutopilot workflowsBrand IdentityWeekly reportsSocial publishingBlog and CMS deliveryEmail outreachAutopilot workflowsBrand IdentityWeekly reports
Shopping IntelligenceCompetitor AnalysisBrand IdentityShopping IntelligenceCompetitor AnalysisBrand Identity

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 put your growth work on autopilot?

Connect your business once, then let Brand Armor AI find opportunities, create content, publish it, and learn from what brings customers in.