Skip to main content

JSONPath Tester

Test JSONPath expressions online with live results: filters, wildcards, recursive descent and slices, with matching values, paths and JSON Pointers.

100% client-side · no data leaves your browser
2 matches
Result
[
  "Sayings of the Century",
  "Moby Dick"
]

Syntax

$The root object
@The current item (inside filters)
.name or ['name']A child property
..Recursive descent: search all levels
*Every child (wildcard)
[n]Array index; negative counts from the end
[a,b]Several indexes or names
[start:end:step]Array slice
[?(expr)]Filter: ==, ===, !=, <, <=, >, >=, &&, ||, !
^Parent of the match (jsonpath-plus)
~Property names instead of values (jsonpath-plus)

Filters run in a sandboxed interpreter (jsonpath-plus “safe” mode): comparisons, &&, || and property access work; arbitrary JavaScript never runs.

About this tool

Write a JSONPath expression and see the matches update as you type. Results can be shown as values, normalized paths or JSON Pointers. The tester supports the full syntax: dot and bracket notation, wildcards, recursive descent (..), array slices and negative indexes, unions, and filter expressions with comparisons, && and ||, including references to the root document with $. Fourteen clickable examples and a syntax table help you get started, using the classic bookstore sample. Filters run in a sandboxed interpreter, so no JavaScript from an expression is ever executed, and your JSON stays in your browser.

How to test a JSONPath expression

Try JSONPath queries on your JSON.

  1. 1

    Paste your JSON

    Paste a JSON document, or use the bookstore sample.

  2. 2

    Write the expression

    Type a JSONPath such as $..book[?(@.price < 10)].title, or click an example.

  3. 3

    Read the matches

    See the matching values, or switch to paths or JSON Pointers and copy them.