JSONPath Tester

Live

JSONPath Tester runs a JSONPath expression against your JSON and shows every matching value.

Runs in your browser: what you enter is processed on your device and not uploaded to MyToolDock.

Supports the common JSONPath syntax: $ (root), .key, ['key'], [0] and [-1], [*] and .*, [start:end], .. (search at any depth) and filters such as [?(@.price < 10)] or [?(@.isbn)]. Combined filters (&&, ||), unions and script expressions are not supported, and different libraries differ on edge cases.

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

  1. Enter JSON data and a JSONPath expression such as $.store.book[?(@.price < 10)].title in the input fields on this page.
  2. Press the button to run JSONPath Tester.
  3. Read the matches as a JSON array and a match count in the result area, and copy or download it.

Common Uses

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.

Related Tools

.env and .properties to JSON Converter .env File Validator Ascii85 Encoder and Decoder Base32 Encoder and Decoder JSON Validator & Linter JWT Generator

More Developer Tools guides

More in Developer Tools · Browse all tools

Developer Scratchpad

Copied to clipboard!