JSONPath Query Tester

Write a JSONPath expression and instantly see the matching values and their exact paths, using the standard RFC 9535 syntax with filters, slices and functions.

Funziona nel tuo browser. I tuoi file non lasciano mai il dispositivo. Scopri come verificarlo

…

Come si usa

  1. 1
    Paste JSON

    Paste the document to query.

  2. 2
    Write the expression

    Start with $ and add selectors.

  3. 3
    Try an example

    Pick one from the examples list.

  4. 4
    Read matches

    Check values and normalized paths.

  5. 5
    Refine

    Add filters or slices until the result is right.

  6. 6
    Copy

    Copy the values as an array or lines.

Informazioni su questo strumento

JSONPath is to JSON what XPath is to XML: a short expression that picks values out of a document, such as all authors, every price under 10 or the last item in a list. It is used in API testing tools, Kubernetes kubectl output, AWS Step Functions, log processors and many SDKs. For years every library had its own dialect, which made expressions hard to share. RFC 9535, published in 2024, standardised the syntax. This tester follows that standard: root and current-node identifiers, dot and bracket member access, negative indexes, slices with steps, wildcards, recursive descent, filters with comparisons and logical operators, and the functions length, count, match, search and value. Every match is listed with its normalized path, such as $['store']['book'][2]['title'], so you know exactly where it came from, and the result can be copied as a JSON array or one value per line.

Syntax at a glance

- $ the document root; @ the current item inside a filter. - .name or ['name'] a member; ['a','b'] several members. - [0] the first item, [-1] the last, [0,2] several. - [1:3] a slice from index 1 up to 3; [::2] every other item; [::-1] reversed. - [*] or .* every child; ..name any descendant called name; ..* every value at any depth. - [[email protected] < 10] items whose price is below 10; combine with &&, || and !, compare with == != < <= > >=. - [[email protected]] items that have an isbn member at all. - length(@.title), count(@.tags[*]), match(@.code, 'A[0-9]+'), search(@.name, 'son') and value() inside filters.

Normalized paths

Each result shows the unique path to the value in the standard normalized form. Paste it into code or documentation to point at exactly that value.

Differences from older dialects

Some older libraries used ?() around filters, allowed JavaScript inside filters, or returned different results for missing members. RFC 9535 filters are written [?…] without parentheses (parentheses still work for grouping), and expressions never run code. If an expression from another tool fails here, check for those differences.

Typical uses

- Designing extractors for API tests in Postman, Karate or REST Assured. - Writing kubectl -o jsonpath templates. - Picking fields out of logs or event payloads. - Teaching and learning JSONPath with immediate feedback.

Worked filters

$..book[[email protected] < 10 && @.category == 'fiction'] combines two conditions; $..book[[email protected]] finds books without an ISBN; $..book[?search(@.title, 'Lord')] finds titles containing a word anywhere in them, ignoring position.

Limits

Very large documents are slow in a browser tab. Regular expressions in match and search follow JavaScript's Unicode regex engine, which is close to but not exactly I-Regexp. This is a learning and testing aid; check the dialect of the library you deploy with.

Esempio svolto

On the classic bookstore example, $..book[[email protected] < 10].title returns "Sayings of the Century" and "Moby Dick" with paths $['store']['book'][0]['title'] and $['store']['book'][2]['title'].

In breve

Domande frequenti

Which JSONPath version is this?

The IETF standard, RFC 9535, published in 2024.

Can I use filters?

Yes: comparisons, &&, ||, !, existence tests and standard functions.

What is a normalized path?

The unique, standard way to write the path to one value, such as $['a'][0].

Does it run JavaScript in filters?

No. RFC 9535 filters are expressions only, which is safer.

Is my JSON uploaded?

No. Queries run in your browser.

Why does my old expression fail?

Older dialects used ?() and script syntax; rewrite the filter as [?…].

Completamente gratisNessun costo, nessuna registrazione
I file restano privatiTutto funziona nel tuo browser
Facile nella tua linguaDisponibile in molte lingue