b2KIT

JSONPath Tester

Test JSONPath expressions against JSON documents with matched value highlighting and result display.

Tested tool guide Tested browser tools Checked August 16, 2026

What JSONPath Tester does, with a checked example

Paste a JSON document and enter a JSONPath expression to see which values the path selects. The tester displays the resulting matches and highlights the corresponding values in the source, making it useful for checking a query before placing it in code or configuration. The usual surprise is that JSONPath produces a list of selected nodes. A valid query can match zero, one, or many locations, so one result should not be mistaken for a guarantee that the expression is singular.

Worked example

A concrete input and expected output from the current implementation.

Input

JSON:
{"users":[{"name":"Ada"},{"name":"Lin"}]}

JSONPath:
$.users[*].name

Expected output

[
  "Ada",
  "Lin"
]

$ selects the document root, .users selects the users array, [*] selects both array elements, and .name selects the name member from each element. There are exactly two matching nodes, in the same order as the array elements.

How the result is produced

1

Path evaluation

A JSONPath query begins at the root value identified by $. Member segments select object properties, array index segments select particular elements, and wildcards can select multiple children. The tester evaluates the complete expression against the pasted document, lists every matched value, and highlights the source values associated with those matches.

2

Match interpretation

Results represent selected JSON nodes, not unique text values. If two different locations contain the same string, both locations can appear as separate matches. A query that reaches an existing property whose value is null also differs from a query that reaches no property. The displayed match count and highlighting help distinguish these cases.

Good uses

  • Check that a JSONPath intended for an API response selects the required nested properties rather than a similarly named property elsewhere in the payload.
  • Develop an array query by testing indexes and wildcards against a small representative JSON document before copying the expression into application code.
  • Investigate why a filter, member segment, or array selection returns too many, too few, or no values for a particular document shape.

Limits and checks

  • JSONPath implementations can differ in support for filters, functions, and older script-like extensions. A query accepted by this tester is not automatic proof that another product or library accepts the same syntax.
  • An empty result means no nodes were selected. It does not mean the expression selected a JSON null value, an empty string, an empty object, or an empty array.
  • Highlights identify matching values in the supplied sample only. They do not establish that the same path will find a result in documents where properties are missing, arrays have different lengths, or value types change.

Common questions

Does testing a JSONPath expression change the JSON document?

No. The tester evaluates the expression against the document and reports selected values; it does not use JSONPath as an update language. Editing, deleting, or replacing a matched property must be done separately. Because the document is processed in the browser, the pasted JSON is not uploaded by this tool.

Why does a path work here but fail in my application?

The application may implement a different JSONPath dialect or support a smaller feature set. Compare the disputed syntax, especially filters or functions, with the application's own documentation and RFC 9535. Also test the exact runtime document: a changed property name, array shape, capitalization, or value type can produce no matches even when the expression remains valid.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools