What is JSONPath Tester?
JSONPath Tester runs a JSONPath expression against your JSON and shows every matching value. It supports the common syntax (keys, indexes, wildcards, slices, recursive search and simple filters). Combined filters, unions and script expressions are not supported, and libraries differ on edge cases.
How It Works
- Enter JSON data and a JSONPath expression such as $.store.book[?(@.price < 10)].title in the input fields on this page.
- Press the button to run JSONPath Tester.
- Read the matches as a JSON array and a match count in the result area, and copy or download it.
Common Uses
- Testing a path before using it in code or a tool.
- Pulling values out of a large response.
- Learning JSONPath.
Good to Know
Use .. to search at any depth, for example $..price finds every price in the document.
JSONPath in short
JSONPath is a query language for JSON, similar to XPath for XML. $ is the root, .key or ['key'] selects a property, [0] selects an array item, [*] selects every child, [1:3] slices, .. searches at any depth, and [?(@.price < 10)] keeps items that match a condition.
Worked example
With a store that has a list of books, $.store.book[*].title returns every title, $.store.book[-1] returns the last book, $..price returns every price anywhere, and $.store.book[?(@.price < 10)].title returns only the titles of books under 10.
What is supported
Keys, quoted keys, indexes (including negative), wildcards, slices, recursive search, and filters comparing a field with a value using ==, !=, <, >, <= and >=, or testing that a field exists. Combined filters, unions, and script expressions are not supported, and JSONPath libraries differ on edge cases, so test the same expression in the library you will actually use.
Frequently Asked Questions
Why do I get an empty array?
Nothing matched. Check key spelling and case, and whether a value is a string rather than a number in a filter.
How do I search the whole document?
Use .. before the key, for example $..email.
Is my JSON uploaded?
No. It is processed in your browser.
What does JSONPath Tester do?
JSONPath Tester runs a JSONPath expression against your JSON and shows every matching value. It supports the common syntax (keys, indexes, wildcards, slices, recursive search and simple filters). Combined filters, unions and script expressions are not supported, and libraries differ on edge cases.
What do I need to enter in JSONPath Tester?
JSON data and a JSONPath expression such as $.store.book[?(@.price < 10)].title.
Is my data private in JSONPath Tester?
Your JSON stays in your browser.
Is MyToolDock JSONPath Tester free to use?
Yes, MyToolDock JSONPath Tester is 100% free with no registration, subscriptions, or limits. All features are fully unlocked.