Data & CSV

JSONPath Tester

JSONPath Tester

Run JSONPath expressions against your JSON and see matching values and paths live.

About this tool

About JSONPath Tester

JSONPath selects values from a JSON document with a short expression, the way XPath does for XML. It is used in API testing tools, Kubernetes kubectl output, log pipelines, low-code automations and many SDKs, and the syntax is easy to get slightly wrong. Type an expression and the matching values appear immediately, together with the exact path of every match and its JSON Pointer, so you can see why something matched or didn't. The tester supports the full common syntax: dot and bracket child access, the * wildcard, .. recursive descent, array slices like [-1:] and [0:3], unions like [0,1], and filter expressions such as [?(@.price < 10)] or [?(@.isbn)]. Example chips load ready-made expressions against the sample bookstore document so you can learn by changing them. Filters are evaluated in a safe mode with no arbitrary code. Your JSON stays in your browser and is never uploaded. With your own AI key you can describe what to select and get an expression, tested here before you use it.

Built and maintained by Abhi JainUpdated

How to Test a JSONPath Expression

  1. 1

    Add your JSON

    Paste JSON into the JSON pane or open a file. The bookstore sample is loaded to start with.

  2. 2

    Write an expression

    Type into JSONPath expression, or click an example such as Every price or Filter by price.

  3. 3

    Check the matches

    See the matching data under Values and the path of each match under Paths, then copy either.

JSONPath Tester: questions and answers

What does $ mean in JSONPath?

$ is the root of the document. Every expression starts with it, for example $.store.book[0].title selects the title of the first book.

How do I filter an array in JSONPath?

Use a filter expression with @ for the current item: $.books[?(@.price < 10)] returns books cheaper than 10, and $.books[?(@.isbn)] returns books that have an isbn key.

What is the difference between . and .. in JSONPath?

A single dot selects a direct child. Two dots (recursive descent) search at any depth, so $..price finds every price key anywhere in the document.

How do I get the last item of an array?

Use a slice with a negative start: $.items[-1:] returns the last item, and $.items[-2:] the last two.

Is my JSON sent anywhere?

No. Expressions are evaluated in your browser with the jsonpath-plus library.

Can AI write the JSONPath for me?

Yes. Click AI and describe what you want, such as "titles of books under 10". An outline of your JSON (keys and first array items) is sent, and the suggested expression is run here so you see its match count before using it. It's optional and uses your own AI key (Claude, OpenAI, Gemini, DeepSeek, OpenRouter or a compatible endpoint), sent straight from your browser to that provider; KissThePDF never sees it. Without a key the tool works exactly the same.