JSONPath Tester

100% private — runs on your device, never uploaded. Works offline once loaded.

Paste JSON, type a JSONPath-style query, and see the matched values as JSON instantly. Supports the root $, dot and bracket notation, array indexes, wildcards, and recursive descent — all evaluated locally in your browser.

What JSONPath is for

JSONPath is a query language for JSON, loosely modelled on XPath for XML. Instead of writing loops to dig into a nested structure, you describe the path to the data you want and let the evaluator collect every value that matches. A query like $.store.books[*].price reads as: start at the root, go into store, into books, take every element, and return each price. This tester evaluates that path live so you can confirm a query selects exactly what you expect before you hard-code it into an application or a tool like a JSON pipeline.

The syntax this tool understands

The evaluator is implemented from scratch — no external library — and supports the most-used slice of JSONPath. The leading $ is the root and is optional. Child access works with dot notation (.title) or bracket notation (['title'] or ["title"]), the latter being useful for keys with spaces or symbols.

  • $ — the root of the document
  • .key or ['key'] — a named child property
  • [0], [-1] — array element by index, negatives count from the end
  • [*] and .* — every element of an array or every value of an object
  • ..key — recursive descent: find that key at any depth

When to reach for it

Reach for a JSONPath tester whenever you need to extract a slice of a large or deeply nested document without writing code. It is ideal for exploring an unfamiliar API response, drafting the extraction expression for a low-code automation platform, or sanity-checking a path before pasting it into a config for tools that consume JSONPath. Because you see the matches immediately, iterating on a tricky query takes seconds.

Recursive descent, explained

The .. operator is the most powerful and the easiest to misuse. $..author means: search the entire document — root and every nested object and array — and collect every value stored under an author key, no matter how deep. This is perfect when the same field appears at several levels, but on a big document it can return more than you expect, so read the match count the tester shows and narrow the path if needed.

Frequently asked questions

Is this the full JSONPath spec?

No — it implements the common subset: root, child access, indexes, wildcards, and recursive descent. Filter expressions like [?(@.price>10)] and slices like [0:3] are not supported.

Why did my query return zero matches?

Usually a typo in a key name, or an index that's out of range. Check the exact spelling and that the path matches the structure of your JSON.

How do I query a key with a space or dash?

Use bracket notation with quotes, e.g. $['first name'] or $["order-id"], which handles any character in the key.

What does a negative index do?

It counts from the end of an array: [-1] is the last element, [-2] the second-to-last, matching how many languages slice arrays.

Can I select every value of an object?

Yes — use .* or [*] on an object node and you get all of its values, just as you would get all elements of an array.

Is anything sent to a server?

No. Your JSON and query are evaluated locally in the browser, so nothing leaves your device.

Advertisement