JSONPath Evaluator — Test JSONPath Expressions
Evaluate JSONPath expressions against JSON data. Supports standard JSONPath and JSONPath Plus extensions. Runs entirely in your browser. No uploads, no limits.
JSON Path Evaluator
Evaluate JSONPath expressions against JSON data. First line = JSON, remaining lines = JSONPath expression. Works entirely in your browser.
JSONPath is to JSON what XPath is to XML: a query language for extracting specific values from a structured document. It was defined by Stefan Gössner in 2007 as a way to navigate JSON the way XPath navigates XML, and it has become the standard way to extract values from JSON in tests, scripts, and configuration files. The basic syntax is $ for the root, .key for object property access, [n] for array indexing, [*] for all array elements, and .. for recursive descent (match at any depth). That subset covers most use cases; the extensions in JSONPath Plus add filter expressions, arithmetic, and a small set of functions.
The non-obvious thing about JSONPath is the difference between $.a.b.c and $..c. The first matches a c value at a specific path — if any segment in the path does not exist, the result is empty. The second matches every c value at any depth in the document — useful for finding all occurrences of a field name without knowing the structure. The trade-off is precision: the first is strict and fails loudly on missing paths; the second is permissive and may return more matches than expected. The right pick depends on the data: well-known schemas (an API you control) call for the strict form; exploratory queries (an unknown API, a one-off analysis) call for the recursive form.
For a final hand-off: if the destination is a shell script, jq is the standard tool — its syntax is a strict superset of basic JSONPath. If the destination is a test in JavaScript or Python, the JSONPath library for that language is the right pick. If the destination is a configuration file (a Cypress test selector, a Postman test), the JSONPath expression itself is the artifact — paste it into the destination’s test syntax. For complex queries that need filter expressions or functions, JSONPath Plus is the only widely-supported extension, and the tool evaluates it natively.
How to use
Paste your JSON
Drop a JSON document into the left panel. The data is parsed and validated as you type; malformed JSON is flagged inline with a pointer to the syntax error.
Write a JSONPath expression
Type an expression like `$.users[*].email` or `$..price` into the JSONPath field. The evaluator runs as you type and highlights matching nodes in the JSON panel.
Read the result
The result panel shows the matched values as a JSON array, with the count and the path to each match. Click a result to scroll the JSON panel to that location.
Frequently asked
What is the difference between JSONPath and JSONPath Plus?
JSONPath is the original Stefan Gössner specification from 2007. JSONPath Plus extends it with arithmetic, filter expressions, and array slicing that the original does not support. The tool supports both — the parser auto-detects the dialect based on the expression syntax.
How do I get all values of a key across an array?
Use the wildcard `[*]`. For `$.users[*].email`, the expression returns every `email` value from every object in the `users` array. For nested arrays, the recursive descent operator `..` matches at any depth — `$..email` returns every `email` value anywhere in the document.
Can I filter results with a condition?
Yes — JSONPath Plus supports filter expressions. `$.users[?(@.age > 18)]` returns only users older than 18. `$.items[?(@.price < 10)]` returns only items priced under 10. The `@` refers to the current node in the filter expression.
What if no nodes match?
The result is an empty array. The result panel shows `[]` and the count is 0. An empty result is not an error — it means the expression is valid but found no matches in the data. Check the expression's syntax and the data's structure if this is unexpected.
Does it support JSONPath functions like length() and min()?
JSONPath Plus supports a small set of functions: `length()`, `count()`, `match()`, `search()`, `value()`, `keys()`, `min()`, `max()`, `avg()`, `sum()`. The full list is in the JSONPath Plus documentation. Standard JSONPath does not support any of these.
Limitations
- Limited JSONPath dialect supportThe tool supports standard JSONPath and JSONPath Plus. Vendor-specific extensions (Goessner JSONPath with custom operators, XPath-style axes) are not supported. Check the result count and the matched paths if a complex expression returns no results.
- No schema-aware filteringFilter expressions are runtime checks against the data, not schema-aware predicates. A filter `?(@.type == 'user')` works at runtime but cannot be type-checked against a JSON Schema before evaluation.
- No streaming evaluationThe full JSON document is loaded into memory before evaluation. For multi-gigabyte JSON, the UI may stall or fail. Use a streaming JSON parser (ijson, oboe.js) for documents that do not fit in memory.
Platform notes
- macOS
- For command-line work, `jq '.users[].email'` is the standard equivalent for simple JSONPath. The browser tool is the right pick for filter expressions, recursive descent, and JSONPath Plus functions that `jq` does not support.
- Windows
- PowerShell's `ConvertFrom-Json` plus `Select-Object` can navigate JSON. The browser tool is the right pick for JSONPath expressions that PowerShell's object-pipeline syntax does not naturally express, especially recursive descent and filters.
- Linux
- `jq` is the standard CLI tool for JSONPath queries. The browser tool is the right pick for JSONPath Plus features (filter expressions, arithmetic, functions) that vanilla `jq` does not support — for those, use `jq` with custom functions or `faudensics/jaq`.
- Web
- Runs entirely client-side. Works offline once the page has loaded. Useful for testing JSONPath expressions in restricted environments where `jq` or a Python install is not available, or for interactive exploration of API responses captured in a browser tab.