JSONPath Tester
Ask a precise question of your JSON. Inspect the values that match and the paths that tell you where each came from.
Start with $. Ctrl/Cmd + Enter runs. Escape, then Tab leaves either editor. Query syntax is validated by the engine; the query editor uses plain text.
Up to 200,000 UTF-8 bytes and 64 levels. Duplicate keys and unsafe integer values are rejected. Use strings for large IDs.
2 matches
[
{
"path": "$['items'][0]['name']",
"value": "Card grid"
},
{
"path": "$['items'][1]['name']",
"value": "Focus ring"
}
]
The query is valid and selected no nodes. An empty array is the complete result.
Paths identify locations in the document, including quoted property names and array indices. Results preserve duplicate selections; object member order is not a sorting guarantee.
The example matches two published pattern names.
Query JSON without executing JavaScript
JSONPath selects nodes within a JSON document. The root is $,
a child name selects an object member, and square brackets express quoted
names, array indices, wildcards, slices, or filters. This tool uses the
precompiled parser and AST evaluator in jsonpath-rfc9535 1.3.0. It does not evaluate a query as
JavaScript, permit custom code, or fetch URLs from your data.
Read a result with its location
- Paste complete JSON into the document editor.
- Write a JSONPath query or choose an example, then select Run query.
-
Read the match count and each normalized path alongside its value. A
valid query with no matches returns
[]; an error clears the result. - Choose paths plus values or values only, then copy or download the exact displayed JSON.
Selectors you can try
-
$.items[*].nameselects every item name. -
$.items[0:2]selects the first two items; slice ends are exclusive. -
$['release notes'].versionaddresses a key containing a space. -
$.items[?@.published == true].nameselects names from matching objects. -
$.items[?length(@.name) > 10]uses a value-returning function in a comparison. -
$..namesearches descendants for members named name.
The supported dialect
The engine follows RFC 9535 selectors, negative indices, array slices, descendant segments, existence tests, comparisons, and logical filter operators. This interface enables the standard length(), count(), and value() functions with argument checks. Regex match() and search() functions are deliberately excluded because this engine’s regex translation has limitations. Custom functions, JavaScript expressions, arithmetic script selectors, and legacy regex operators such as =~ are not supported.
Missing members are not the same as a JSON null value. A slice with a zero step selects nothing under the standard. Object member ordering is not guaranteed; duplicate selections are retained. Different legacy JSONPath libraries can disagree with these rules. This is a bounded query tool, not a claim that every JSONPath dialect is interchangeable.
Numbers and strict JSON
The shared strict JSON parser rejects duplicate keys, comments, and trailing commas. Evaluation uses JavaScript numbers, so integers outside the safe integer range and nonfinite parsed numbers are rejected. Decimal fractions use binary floating-point arithmetic and may lose precision. Quote exact monetary amounts or very large IDs when their original digits must be retained. Results serialize decoded values, so original whitespace, escapes, exponent spelling, and negative zero are not preserved.
Limits and cancellation
Input is capped at 200,000 UTF-8 bytes, 20,000 JSON values, and 64 nesting levels. Queries accept 2,000 characters, at most 500 AST nodes, and 48 AST nesting levels. Matching stops at 1,000 nodes or 500,000 output characters. A fresh worker is terminated after two seconds, when cancelled, or when either editor changes. No partial result is exported after a limit error. Large repeated descendant queries may hit the time limit even on a small document.
The page and worker assets must be available to the browser. Offline reloads and offline worker restarts are not guaranteed; a loading failure clears the output and displays an error. JSON and query text are never sent to a server.
References: RFC 9535 JSONPath and the engine’s source and documented behavior .