Developer Tools

JSONPath Tester


Test and debug JSONPath expressions against any JSON document live, with example queries and pretty-printed results - free and fully in your browser.

No query run yet
Example queries — click to try:
empty

💡 JSONPath syntax cheat sheet

  • $ — the root of the document
  • .key or ['key'] — a child property
  • ..key — recursive descent (search at any depth)
  • * — wildcard, all elements or properties
  • [n] — array index; [0,2] selects multiple
  • [start:end:step] — array slice, e.g. [-1:] for the last item
  • [?(@.price<10)] — filter expression on each element (@ is the current item)
💡 Tip: Press Ctrl+Enter in either pane to run the query. Everything runs in your browser — nothing is uploaded.

The JSONPath Tester is a free, browser-based tool that evaluates JSONPath expressions against a JSON document in real time and shows every matching value, pretty-printed, with a live match count. Paste your JSON on the left, type a JSONPath query like $.store.book[*].author, and the tool returns exactly what that path selects - so you can build and debug a query before you ship it in code.

Everything runs client-side: the JSON is parsed with the browser's native JSON.parse, and the query is evaluated with the widely used jsonpath-plus engine loaded on demand. Your data never leaves your device, there is no sign-up, and there is no size limit beyond your browser's memory.

What is JSONPath?

JSONPath is a query language for JSON, conceptually similar to what XPath is for XML. A path expression describes how to walk into a JSON structure and pull out the values you want - a single field, every item in an array, or only the elements that match a condition. It is used everywhere JSON needs to be filtered or extracted: API integrations, log pipelines, configuration tooling, Kubernetes kubectl output, and libraries in almost every language.

How to test a JSONPath expression

  1. Paste your JSON into the left pane, or click Load sample to start with a ready-made document.
  2. Type a JSONPath expression in the query field (or click one of the example queries to try it instantly).
  3. Click Run, or press Ctrl+Enter from either pane.
  4. Read the matching values, pretty-printed as JSON, in the results pane, and check the match count next to the query.
  5. Click Copy to grab the results for use elsewhere.

Supported JSONPath syntax

  • $ - the root object or array of the document.
  • .key / ['key'] - select a child property by name.
  • ..key - recursive descent, finding a key at any depth.
  • * - a wildcard that matches all elements or properties.
  • [n] and [0,2] - select array items by index, including multiple indexes.
  • [start:end:step] - array slices, such as [-1:] for the last element.
  • [?(@.price<10)] - filter expressions where @ refers to the current element.

Why use a live JSONPath tester

Writing a JSONPath by hand and running your whole application just to see whether it matched is slow and error-prone. A live tester gives you an instant feedback loop: you can watch the match count change as you refine a filter, confirm a recursive .. query is not grabbing more than you expect, and catch a typo in a bracket before it becomes a production bug. Because the JSON is validated as you type, malformed input is flagged immediately rather than failing silently inside the query engine.

JSONPath vs. other ways to work with JSON

JSONPath is the right tool when you need to extract or filter values from a structure you already have. If you instead need to clean up and read a messy payload, a dedicated JSON Formatter is faster, and when you want to reshape JSON into another format you might reach for a JSON to YAML Converter or generate static types with a JSON to TypeScript Converter. For matching text patterns rather than JSON structure, a Regex Tester & Explainer is the counterpart, and to compare two JSON documents line by line a Diff Checker pairs well with this tester.

Frequently Asked Questions

Is my JSON uploaded to a server?

No. Both the JSON parsing and the JSONPath evaluation happen entirely in your browser with JavaScript. Your data never leaves your device, which makes the tool safe for sensitive or proprietary payloads.

Which JSONPath features are supported?

The tester supports the common JSONPath syntax: the root $, child access with dots or brackets, recursive descent with .., the * wildcard, array indexes and unions like [0,2], slices like [-1:], and filter expressions such as [?(@.price<10)]. It is powered by the jsonpath-plus library.

Why does my query return no matches?

A valid query that matches nothing usually means the path does not exist in that document - a misspelled key, the wrong array index, or a filter condition that no element satisfies. Check the match count and try a broader query like $.. or the recursive form of your key to confirm where the data actually lives.

What is the difference between $.book and $..book?

$.book looks for a book property directly on the root object, while $..book searches for a book key at any depth in the document. Use the recursive .. form when the data is nested and you are not sure of the exact path.

Can I use filter expressions?

Yes. Filters like [?(@.price<10)] or [?(@.isbn)] test each element, where @ is the current item. You can compare fields, check for the existence of a key, and combine conditions to select only the elements you want.

Do I need to install anything?

No. The JSONPath Tester runs in any modern browser with no installation, account, or plugin. Open the page, paste your JSON, and start testing expressions immediately.