Skip to content
Toolew.com

JSONPath Tester

Test JSONPath expressions against your JSON as you type, with matched values, normalised paths and JSON Pointers.

Runs in your browser. Your data is not uploaded.
Loading tool…

This guide is not yet available in your language and is shown in English.

Tool guide

What this tool does

JSONPath Tester evaluates an expression such as $..book[?(@.price < 10)].title against a JSON document live and lists every match with its exact location. Use it to write queries for API tests, log processing and configuration tools, with examples covering wildcards, recursive descent, slices, unions and filters.

JSONPath is a query language for picking values out of JSON, much as XPath does for XML. It appears in API testing tools, Kubernetes kubectl output templates, log pipelines and many low-code platforms. The syntax is compact but easy to get wrong: a missing dot, a filter on the wrong level or a slice with the wrong bounds silently returns nothing, and debugging that inside a test run is slow.

This tester evaluates your expression with the jsonpath-plus engine as you type and shows every match. Each result includes its normalised path, such as $['store']['book'][0]['title'], and the matching JSON Pointer from RFC 6901, such as /store/book/0/title, which you can use with JSON Patch. Filter expressions run in the engine’s safe evaluation mode, which supports comparisons and logical operators without executing arbitrary JavaScript. The document never leaves your browser.

How to use JSONPath Tester

  1. Paste or open your JSON in JSON document, or keep the bookstore sample to experiment.
  2. Type an expression into JSONPath expression. It must start with $, which stands for the document root.
  3. Click any entry in Examples to load a common pattern such as $..author, $..book[-1:] or a filter.
  4. Read the match count and the Matches list, which shows each path with its value and a button to copy the path.
  5. Choose what Show outputs: Matched values, Paths, JSON Pointers or Paths and values.
  6. Copy or download the Result as JSON for use in tests or documentation.

Tips for better results

  • Use .. (recursive descent) to find a key at any depth while exploring, then replace it with an explicit path in production for speed and precision.
  • Filters use @ for the current item: [?(@.price < 10 && @.category === 'fiction')] combines conditions.
  • [?(@.isbn)] matches items where the key exists and is truthy, which is a quick way to find records with an optional field.
  • Slices follow Python rules: [0:2] returns the first two items and [-1:] the last one.

Common use cases

  • Writing assertions for API tests that check a nested value in a response.
  • Extracting IDs or emails from a large export without writing a script.
  • Building field mappings for integration and automation platforms that accept JSONPath.
  • Finding where a key lives in an unfamiliar, deeply nested document.

Common mistakes to avoid

  • Omitting the leading $. Expressions such as store.book are not valid JSONPath.
  • Using a single = in filters. Comparison needs == or ===, and strings must be quoted.
  • Assuming every JSONPath implementation behaves identically. RFC 9535 (2024) standardised the language, but older tools differ on filters and functions, so check your target library.

Frequently asked questions

Which JSONPath syntax does the tester follow?

It uses jsonpath-plus, which implements the original Goessner syntax with extensions. Core selectors (dot and bracket notation, wildcards, recursive descent, slices, unions and filters) match what RFC 9535 describes.

What is the difference between a path and a JSON Pointer?

A normalised JSONPath such as $['items'][2] identifies one location in JSONPath syntax. A JSON Pointer such as /items/2 is the RFC 6901 format used by JSON Patch and JSON Schema references.

Why does my filter return nothing?

The most common causes are filtering at the wrong level (apply the filter to the array, as in book[?(...)]), comparing a number to a quoted string, and misspelt keys, since matching is case-sensitive.

Can a filter run unsafe code?

No. Filters are evaluated in safe mode, which supports property access, comparisons and logical operators but not function calls on arbitrary objects.

Feedback & suggestions

Help us improve JSONPath Tester. We read every message.

Rating (optional)
Necessary
Required for security, language and theme preferences. Always on.