Free JSONPath Tester
Query nested JSON safely with paths, pointers, wildcards, slices and result export.
Loading tool…
How to extract JSON values with safe JSONPath queries
Use JSONPath to select values from a nested document without manually expanding every object. Script expressions and filters are disabled in this workspace.
- Paste or import a JSON document.
- Enter a query beginning with the root symbol $.
- Run the query and inspect matching paths, pointers and values.
- Refine the selector, then copy or download the extracted result.
Who reaches for a JSONPath tester
API responses, configuration exports and log records often bury the one value you need several levels deep. A JSONPath tester lets you write a short selector, see every match at once and confirm the selector is right before you put it into code, a test or a monitoring rule.
Typical users include developers checking a path before adding it to an integration, QA testers pulling every price or ID out of a sample response, and analysts who received a large export and only need one field from each record. It is also a quick way to learn JSONPath syntax by trying small changes and watching the result update.
A worked example with the sample store data
Select Load example to fill the editor with a small store document. It holds a books array with two entries: id 1, Practical Design, price 12, and id 2, Garden Notes, price 18. The query box starts with $.store.books[*].title.
Run that query and the results list two matches. The first has the path $['store']['books'][0]['title'], the pointer /store/books/0/title and the value Practical Design. The second has the path $['store']['books'][1]['title'], the pointer /store/books/1/title and the value Garden Notes.
Now try $..price. Recursive descent searches every level, so it returns 12 and 18 with the pointers /store/books/0/price and /store/books/1/price. The slice $.store.books[-1:].title returns only Garden Notes, because a negative start counts back from the end of the array.
How the query engine reads your selector
Every query must begin with $, which stands for the root of the document, and must stay under 1,000 characters. From there you can chain property names with dots or brackets, pick array positions with indexes, combine several keys or indexes in a union, take a range with a slice such as [0:2], use * as a wildcard and use .. for recursive descent.
Each match comes back with three pieces. The normalized path uses bracket notation for every step, which removes any ambiguity about keys with unusual characters. The JSON Pointer follows the slash style of RFC 6901, which many patch and validation tools expect. The value is the matched data itself, whether a number, a string, an object or an array.
The document can be up to 2 MB, with at most 80,000 nodes and 60 levels of nesting. The query runs in a background worker in your browser, so the page stays responsive and you can cancel a long run.
Common mistakes to avoid
Do not paste filter expressions such as [?(@.price > 10)]. The characters ?, parentheses, @ and the backtick are rejected so that no script can run. Select the wider set instead and narrow it in your own code or with a slice.
Remember that slices exclude the end index, so [0:2] returns positions 0 and 1, not three items. Also check whether your data starts with an object or an array. A path written for $.items[0] will find nothing if the document is itself an array, where $[0] is correct.
Finally, be careful with recursive descent on large files. A query like $..* can produce far more matches than you expect, and the tool stops above 10,000 matches.
Useful tips and limitations
- Start with a simple property path before adding recursive descent or wildcards.
- Queries return up to 10,000 matches. Narrow broad queries when a document is large.
- Copy the JSON Pointer from a match when you need to reference the same location in a JSON Patch or a schema error message.
- Build a long selector one step at a time, running the query after each added segment, so you can see exactly where a path stops matching.
Common questions
Does this JSONPath tester execute JavaScript filters?
No. Script expressions and filters are disabled. Use supported property selectors, indexes, wildcards, unions, slices and recursive descent.
Can I see where each JSONPath match came from?
Yes. Each result includes its normalized path, JSON Pointer and matching value.
What is the difference between the path and the pointer in each result?
The path is a normalized JSONPath in bracket notation, such as $['store']['books'][0]. The pointer is the same location written in JSON Pointer form, such as /store/books/0. Both identify one exact node.
Can I select several properties in one query?
Yes. Use a union inside brackets, for example $.store.books[*]['id','title'], to return both fields from every book in a single run.
How large can my JSON document be?
The input can be up to 2 MB, with no more than 80,000 nodes and 60 nesting levels. Larger documents should be trimmed or split before querying.
Queries run locally and do not execute scripts or send JSON to a server.
