JSONPath Tester

UtiliStudio Workspace Tool

Query, filter, and extract nested data from JSON documents with declarative JSONPath expressions. Real-time evaluation with syntax guidance.

Test and evaluate JSONPath expressions directly in your browser
Open in full workspace
Loading JSONPath Tester…

Key Capabilities

Real-Time Expression Evaluation

Test queries as you type and immediately view matched JSON values, matched paths, and extraction tallies.

Dot & Bracket Property Access

Navigate deeply nested objects using standard dot notation ($.store.book) or bracket notation ($['store']['book']).

Array Indexing & Wildcards

Extract specific array elements by index ($.items[0]), query all elements with wildcards ($.items[*]), or project sub-fields across collections.

Declarative, Safe Query Engine

Query execution runs through a strictly declarative parser with zero code generation or dynamic execution.

How to Use JSONPath Tester

1

Enter JSON document

Paste your structured JSON payload into the document editor or load sample data.

2

Write JSONPath expression

Type your query in the path input bar starting with the root symbol $, such as $.items[*].name.

3

Review match results

Inspect extracted nodes, match counts, and structural highlights in the output pane.

4

Copy extracted data

Copy the formatted array of matching elements directly to your clipboard for use in code or configuration.

Practical Examples

Extracting Author Names from a Catalog

Use wildcard projection $.store.book[*].author to gather all author names across an array of book objects.

Input (Raw / Unformatted)
{
  "store": {
    "book": [
      { "category": "fiction", "author": "Herman Melville", "title": "Moby Dick" },
      { "category": "science", "author": "Carl Sagan", "title": "Cosmos" }
    ]
  }
}

Expression: $.store.book[*].author
Output (Formatted & Indented)
Match Count: 2
[
  "Herman Melville",
  "Carl Sagan"
]

JSONPath Tester Guide

What JSONPath does

JSONPath is a query language for selecting values inside a JSON document, in the same way that XPath selects nodes in XML. Instead of writing loops and null checks in code, you describe the path to the data you want and the engine returns every matching value. Stefan Goessner proposed the syntax in 2007, and after many slightly different implementations it was standardized as RFC 9535 in 2024.

JSONPath is used in API testing tools, Kubernetes kubectl output formatting, AWS Step Functions, log processors, and many integration platforms. Testing an expression against real sample data before putting it into one of those systems saves a lot of trial and error.

Core syntax

Every expression starts with $, which represents the root of the document. Child members are selected with dot notation such as $.store.name, or with bracket notation such as $['store']['name']. Bracket notation is required when a key contains spaces, hyphens, or other special characters.

Arrays are indexed from zero: $.items[0] is the first element and $.items[-1] is the last. Slices work like Python, so $.items[0:3] returns the first three elements and $.items[::2] returns every second element. The wildcard * selects all members of an object or all elements of an array, so $.items[*].id returns the id of every item.

The double dot .. performs a recursive descent, searching every level of the document. $..price finds every price field no matter how deeply it is nested. It is powerful but can return more than you expect on large documents, so combine it with a more specific path when you can.

Filtering with expressions

Filter expressions select array elements that meet a condition. They are written as [?(...)] in classic syntax or [?...] in RFC 9535, and the @ symbol refers to the current element. For example, $.books[?(@.price < 10)].title returns the titles of books cheaper than 10, and $.users[?(@.active == true)] returns only active users.

Filters can compare against strings and numbers, check whether a member exists with an expression such as [?(@.email)], and combine conditions with && and ||. Because implementations historically differed in how they handle filters, regular expressions, and functions, always test an expression with the same flavor your production tool uses.

Practical tips

Build expressions incrementally. Start with $ and add one segment at a time, checking the result after each step. When a query returns nothing, the most common causes are a typo in a key name, the wrong letter case, or treating an object as an array.

Remember that JSONPath always returns a list of matches, even when only one value is found, and an empty list when nothing matches. Code that consumes the result should handle both cases. For simple direct lookups, a JSON Pointer such as /store/books/0/title is an alternative that addresses exactly one location, and it is the format used by JSON Schema error messages and JSON Patch operations.

Common JSONPath patterns

A few expressions cover most everyday needs. $.data[*].id collects one field from every element of an array. $..email finds every email address at any depth, which is handy when exploring an unfamiliar API response. $.orders[?(@.status == 'failed')].id returns the IDs of failed orders, and $.items[-1:] returns the last element of a list as a one-item result.

When a document has an unpredictable structure, combine recursive descent with a filter, for example $..[?(@.type == 'error')], to find every object of a certain kind wherever it appears. Keep such broad queries for exploration, and switch to explicit paths in production configuration so that unrelated changes elsewhere in the document cannot change the result.

Common Use Cases

Inspecting Complex API Responses

Isolate critical data fields from sprawling multi-megabyte JSON payloads returned by REST APIs and GraphQL gateways.

Testing CI/CD & Build Pipeline Selectors

Validate JSONPath expressions used in GitHub Actions, Kubernetes manifests, and monitoring webhooks before deployment.

Data Extraction for Analytics

Flatten or collect specific entity attributes across arrays for analytical reporting and database ingestion.

Debugging Cloud & Serverless Event Logs

Target exact properties inside AWS CloudWatch, Datadog, or GCP event JSON blobs with surgical precision.

Frequently Asked Questions

Which JSONPath syntax elements are supported?

The evaluator supports the root identifier ($), dot and bracket property access ($.name, $['name']), array index lookups ($.items[0]), array wildcards ($.items[*]), object wildcards ($.*), and array length properties ($.items.length).

How are expression errors communicated?

Invalid queries—such as missing the initial $ root symbol, unmatched brackets, or unclosed quotes—produce real-time syntax indicators highlighting the exact issue.

Can I extract matching values across arrays and nested objects?

Yes. Using wildcard projections like $.items[*].id or $.*.name extracts matching values across all matching child properties into a clean list of results.

Related Guides

Related Developer Tools

Ready to use JSONPath Tester?

The tool is at the top of this page, or open it in the full workspace with tabs, favorites, and Ctrl+K search.