JSON Path Query Evaluator
Evaluate JSONPath and JMESPath queries against JSON data in real time. Paste a JSON payload, write a query expression, and see the filtered result update live with syntax highlighting.
JSON Path Query Evaluator
Run JSONPath queries against JSON data and see filtered results update live.
How to Use the JSON Path Query Evaluator
A QA engineer tests a REST API that returns a nested JSON response with user profiles, order histories, and shipping addresses. The engineer needs to verify that every user object has an email field and that all orders above $100 have a tracking number. Paste the API response into the JSON Data panel, enter the query $.users[*].email to check all email fields, and the result updates live. Then enter $.orders[?(@.total > 100)].trackingNumber to verify tracking numbers on high-value orders. The entire workflow runs in your browser with no server calls.
A developer testing a payment gateway API receives a response with nested transaction objects. Paste the JSON and use $.transactions[*].status to verify all transactions have a status field. Then use $.transactions[?(@.status == "failed")] to isolate failed transactions for debugging. The cheat sheet below the input field shows common query patterns for quick reference.
A developer investigating a production incident pastes a large JSON log entry and uses the recursive descent operator $..error to locate all error fields regardless of nesting depth. This is significantly faster than manually expanding nested objects in a tree viewer. The result shows every error value in a flat array, making it easy to spot patterns across the log.
A data engineer processes JSON through an ETL pipeline and needs to validate the output structure before loading into the data warehouse. Paste the transformed JSON and query $.records.length to verify the expected record count. Use $[?(@.timestamp > "2024-01-01")] to confirm all records have timestamps after the cutoff date. This provides immediate structural verification without writing a full test suite.
A DevOps engineer needs to verify that a Kubernetes deployment manifest has the correct environment variables set. Paste the YAML-converted JSON and use $.spec.template.spec.containers[*].env[*].name to list all environment variable names. Use $.spec.template.spec.containers[?(@.name == "app")].resources.limits.memory to check memory limits on the main container. The live preview updates as you type each query.
How the JSON Path Query Evaluator Works
The query engine uses a tokeniser and recursive-descent architecture to evaluate JSONPath expressions against parsed JSON data. All processing happens in your browser with no server calls.
Tokeniser Architecture
The tokeniser splits the raw JSONPath expression into segments by identifying path separators (dots), bracket groups, filter expressions, and the recursive descent operator. Each token is classified by type: dot-access key, bracket-access key, array index, wildcard, filter expression, or recursive descent. The tokeniser handles nested bracket expressions and quoted string keys within brackets.
Recursive-Descent Evaluation
After tokenisation, the evaluator walks the parsed JavaScript object tree by applying each token in sequence. For dot and bracket tokens, it performs direct property access on the current result set. For wildcards, it expands arrays to all elements and objects to all values. Filter expressions are evaluated by applying the comparison operator (==, !=, less than, greater than, less-equal, greater-equal) between each element field and the provided value, supporting string, numeric, boolean, and null comparisons.
Recursive Descent Operator
The recursive descent operator performs a depth-first traversal of the entire object subtree. At each node, the evaluator checks whether the node matches the subsequent token. For example, $..author finds all properties named author at any depth. This is implemented using a stack-based traversal that visits every nested object and array element, collecting matches in a flat array. The result is deduplicated and formatted as a JSON array.
Frequently Asked Questions
What is JSONPath?
JSONPath is a query language for JSON documents, conceptually similar to XPath for XML. It allows you to select and extract specific parts of a JSON document using path expressions. The syntax uses $ to refer to the root object, dot or bracket notation for property access, wildcards for all children, and filter expressions for conditional selection.
Does it support JMESPath?
The implementation supports standard JSONPath syntax (RFC 9535 style). JMESPath uses a different syntax β for example, store.book[*].title in JMESPath vs $.store.book[*].title in JSONPath. The two are not interchangeable. We recommend checking your project's query language before choosing an evaluator.
Can I use filter expressions?
Yes. Filter expressions use the syntax [?(@.price < 10)] where @ refers to the current element being evaluated. Supported operators are ==, !=, <, >, <=, and >=. Values can be strings (quoted), numbers, or booleans. Nested field access like @.address.city is also supported within filters.
Is there a query length or complexity limit?
There is no hard-coded limit. Standard queries with 5-10 path segments plus filter expressions evaluate in milliseconds. Extremely long queries with deeply nested recursive descent on very large data sets may be slower due to the recursive traversal pattern. For large payloads, consider narrowing the scope with a more specific path.
What happens if the JSON data or query is invalid?
If the JSON data is invalid, the evaluator displays a parse error from the native JSON.parse() method. If the query is syntactically invalid, the evaluator may return no matches or throw an error depending on the specific malformation. The tool defaults to showing an empty result rather than crashing, allowing you to adjust the query incrementally.