A focused JSONPath evaluator
π€ Full syntax support
Dot notation ($.foo.bar), bracket notation ($['foo']), array indexing ($[0]), and slicing all work out of the box. Mixed expressions like $.users[0].name are fully supported.
π Recursive descent
The double-dot operator $..foo walks the entire JSON tree and collects every value whose key is foo, no matter how deeply nested. Perfect for pulling all instances of a field from a complex API response.
π Filter expressions
Use $[?(@.price < 10)] to filter array items where the price field meets a condition. Supports the @ context token plus common comparison operators.
π Path-aware output
Every match is displayed with its full dot-notation path, so you know exactly where each value came from. Use the copy button to export a JSON array of {path, value} pairs.
β‘ Large-data friendly
The evaluator walks the JSON tree in a single pass per query, with linear performance in the number of nodes. Multi-megabyte documents and recursive wildcards complete in well under a second.
π Learning resource
Load the classic bookstore sample and try expressions like $..author or $.store.* to see how JSONPath works in practice. A great way to learn the syntax hands-on.
JSONPath β common questions
What is JSONPath?
JSONPath is a query language for JSON, analogous to XPath for XML. An expression like $.store.book[0].title navigates into the store object, picks the first item of the book array, and returns its title. The result of an evaluation is a list of matching values.
JSONPath was originally proposed by Stefan GΓΆssner in 2007. Since then, several variants have emerged (Goessner, RFC 9535, JSONPath Plus). JSONLab implements the core Goessner syntax, which covers the vast majority of real-world queries.
It is commonly used in JavaScript libraries, REST API clients, monitoring systems, and configuration management tools.
How does JSONPath compare to jq?
jq is a more powerful query and transformation language with its own DSL. It can reshape data, perform arithmetic, group results, and define functions. jq is typically used as a standalone CLI in shell pipelines.
JSONPath is simpler and focuses on selecting nodes by path. It cannot transform data on its own, but it's lightweight, embeds easily into JavaScript applications, and is supported by many HTTP clients (e.g., REST Assured, Jayway).
Use jq when you need transformation and shell integration. Use JSONPath when you need a portable, expression-only selector inside a larger application.
What JSONPath syntax does JSONLab support?
JSONLab's evaluator supports the core Goessner subset: $ (root), $.foo (object property), $['foo'] (bracket notation), $[0] (array index), $..foo (recursive descent), $[*] (wildcard), and basic filter expressions like $[?(@.price < 10)].
Filters support the @ context token and comparison operators (==, !=, <, <=, >, >=). Boolean AND/OR with && and || also work for combining conditions.
More advanced features β such as script expressions, slice notation, and union β may be added in future releases. If your favorite expression doesn't work, please let us know.
Is there a size limit for the input JSON?
No artificial limit. The evaluator walks the JSON tree once per query and collects matches into a flat list, so the algorithm is linear in the number of nodes. For typical API responses (10β500 KB), evaluation completes in single-digit milliseconds.
For multi-megabyte JSON, evaluation typically completes in under a second. If you plan to evaluate many expressions against the same JSON, the document is parsed once and reused across queries β only the evaluation step runs each time.
If matches number in the tens of thousands, rendering may take longer than evaluation. The tool caps display at 1,000 matches by default to keep the page responsive.
Does this work offline and in private?
Yes. JSONLab is 100% browser-based. Both your JSON document and your JSONPath expressions stay on your device β they are never uploaded to a server. You can verify this in your browser's network panel: after the initial page load, no further requests are made.
This makes JSONLab suitable for querying sensitive data like production logs, customer records, or internal API responses. Even the share feature encodes data into the URL hash rather than transmitting it.
You can also save the page for offline use; once cached, it works without an internet connection.