The RFC 9535 core
Child and descendant segments, wildcards, indexes, slices with negative steps, unions and filters.
Run a JSONPath query on a JSON document and see the matching values or their paths, evaluated as RFC 9535 defines, with filters, slices and wildcards.
Paste the JSON or open a .json file
Type the JSONPath query
See the values or paths that match
JSONPath picks values out of a JSON document the way a file path picks a file. Paste the document, type a query in the box below it, and the page shows what the query selects: the values, their locations, or both.
A query starts at the root, $. Then:
.name or ['name'] selects a member of an object, and [0] an element of an array, with [-1] the last.* selects every member or element, and .. searches at every depth, so $..author finds every author key anywhere in the document.[start:end:step] slices an array: [0:2] is the first two, [::-1] is all of them in reverse.[0, 2, 'id'] takes several selectors at once.[?...] filters, keeping the members for which a test is true. Inside, @ is the current member: $.book[?@.price < 10] keeps books under 10, and $.book[?@.isbn] keeps books that have an isbn at all.The standard settles questions the older libraries answered differently. A comparison on a key that is missing compares “nothing”, which equals only another nothing. Equality is deep, so two objects with the same members are equal, and 1 equals 1.0. Ordering with <, <=, > and >= applies to two numbers or two strings only; any other pairing is false both ways rather than an error. Strings are ordered by Unicode code point.
The values come back as a JSON array in document order. “Their paths” lists the normalized path of each match, and “Paths and values” gives an array of both. A query with a mistake is refused with what was expected and the character where it went wrong.
To tidy the document first, use the JSON formatter.
Nothing is uploaded. Your JSON is queried in this tab.
Child and descendant segments, wildcards, indexes, slices with negative steps, unions and filters.
See the matching values, their normalized paths, or both side by side as JSON.
Your JSON is queried in your browser and never sent anywhere.
Nothing uploaded: open the Network panel while it runs and check.
No daily limits or watermarks: free batches take up to 20 images.
Works offline: once the page has loaded, on any current browser.
RFC 9535, the standard published in 2024. Older libraries, written from a 2007 blog post, differ from it and from each other, especially in filters, so a query that works in one tool can give a different answer in another. This page follows the standard.
Not yet. Filters support comparisons, &&, ||, !, parentheses and existence tests, which cover most queries. A query that calls length(), count(), match(), search() or value() is refused with that reason rather than run halfway.
RFC 9535 defines < and its relatives only between two numbers or two strings, and false otherwise. So "13" == 13 is false and "2" < 3 is false, where some older libraries would convert one to the other.
The exact location of a match, written as $['store']['book'][0], with names in single quotes and array positions as numbers. Choose "Their paths" to list them, which shows where each value came from.