JSONPath Tester — Evaluate JSONPath Expressions Online
Paste your JSON and test any JSONPath expression instantly in the browser. No libraries, no server — pure JavaScript.
What is JSONPath?
JSONPath is a query language for JSON, much like XPath is for XML. It was originally defined by Stefan Goessner in 2007 and has since become the de-facto standard for navigating JSON structures in code and tooling. The syntax uses $ to represent the root of the document, dot notation (.key) or bracket notation (['key']) to traverse properties, wildcards like [*] to match all items in an array, and recursive descent via .. to search deeply nested structures. In 2024, JSONPath was formally standardised as RFC 9535 by the IETF. You'll find JSONPath support built into popular libraries and tools: JMESPath offers a related but distinct query language, while jq is a powerful command-line alternative. This tester evaluates expressions entirely in your browser using a native TypeScript implementation — no data leaves your machine.
How to Use the JSONPath Tester
Paste Your JSON
Paste any valid JSON object or array into the left editor panel. You can also click Sample to load the classic bookstore example.
Type a JSONPath Expression
Enter your JSONPath expression in the input above the panels — for example $.store.books[*].title to get all book titles, or $..price to recursively find every price field.
Hit Evaluate and See Results
Click the Evaluate button (or press Enter) and the matching values appear as a JSON array in the right panel. Copy the result with the Copy Result button.
JSONPath Expression Examples
Classic bookstore query: $.store.books[*].title
Returns an array of every book title in the store. Use <code>$.store.books[0].title</code> for just the first book, <code>$.store.books[-1]</code> for the last, or <code>$..author</code> to recursively collect every author anywhere in the document.
Frequently Asked Questions
What does $ mean in JSONPath?
$ represents the root element of the JSON document. Every JSONPath expression must start with $. For example, $.name reads the top-level name property.
How is JSONPath different from XPath?
JSONPath was inspired by XPath but designed for JSON. Key differences: JSONPath uses $ for root (XPath uses /), uses dot notation for properties, and lacks some advanced XPath axes. JSONPath is generally simpler and more readable when working with JSON data.
What does [*] do in JSONPath?
[*] is a wildcard that matches every element of an array or every value of an object. For example, $.books[*].title returns the title of every book in the books array.
How does recursive descent (..) work?
The .. operator performs a recursive descent — it searches all levels of the JSON tree for the specified key. $..price will find every property named price anywhere in the document, no matter how deeply nested.
What filter expressions are supported?
This tester supports basic filter expressions using [?(@.prop)] to check property existence and [?(@.prop operator value)] for comparisons. For example $.books[?(@.price < 10)] returns all books cheaper than 10. Supported operators: >, <, >=, <=, ==, !=.
Related Tools
References: Goessner's original JSONPath article (2007) · RFC 9535 — JSONPath (IETF, 2024) · MDN — JSON · JMESPath Specification · jq Manual · JSON.org