DevSandbox PRIVATE
0 net calls
0 matches
Local

JSONPath tester and query evaluator

Test, evaluate, and extract data from JSON documents with JSONPath queries. All evaluation executes client-side with zero server latency, zero cloud uploads, and zero data exposure.

How to evaluate JSONPath expressions

  1. Paste your JSON document into the left pane, or click Sample to load a demonstration bookstore catalog dataset.
  2. Type a JSONPath expression into the query bar at the top (e.g. $.store.book[*].title or $..price).
  3. Press Evaluate or hit ⌘↵ / Ctrl↵. Matched elements and values are displayed formatted in the results panel.
  4. Click Copy JSON to place the extracted data straight onto your clipboard, or click Download to save the query output as a file.

What is JSONPath? The RFC 9535 Standard

JSONPath was originally proposed by Stefan Goessner in 2007 as the JSON equivalent of XPath for XML documents. In 2024, the Internet Engineering Task Force (IETF) formally standardized JSONPath under RFC 9535, establishing uniform semantics across programming languages, cloud tools, and database systems.

JSONPath defines a deterministic syntax for navigating, selecting, and extracting fragments of structured JSON data. It is heavily utilized across modern engineering ecosystems:

JSONPath syntax reference table

SyntaxNameDetailed Description
$Root identifierReferences the root JSON element or top-level array/object. Every valid JSONPath starts with $.
.nameDot child operatorSelects a direct child property by key name. E.g. $.store returns the store object.
['name']Bracket child operatorSelects a property by string name. Mandatory when keys contain hyphens, spaces, or special punctuation (e.g. $['user-profile']['first name']).
..nameRecursive descentDeep searches the entire JSON tree recursively for all properties matching name, regardless of nesting depth.
*Wildcard selectorMatches all member values of an object or all elements of an array at the current level.
[n]Array indexAccesses array element at 0-based position n. Negative indices like [-1] select elements from the end of the array.
[start:end:step]Array sliceExtracts array items beginning at start up to (excluding) end with an optional increment step (similar to Python slice syntax).
[?(@.price < 10)]Filter expressionEvaluates a boolean condition against each element in a collection. The @ symbol denotes the current item being inspected.

Advanced Filtering and Deep Extraction Patterns

When working with deeply nested microservice responses, understanding the distinction between dot-notation and bracket notation is essential. Consider the following patterns:

1. Recursive Property Extraction

Instead of hardcoding brittle object hierarchies like $.data.customers[*].orders[*].items[*].sku, you can use the recursive descent operator $..sku to flatten and extract all SKU identifiers found anywhere within the document hierarchy.

2. Array Slicing Mechanics

Array slicing allows developers to sample and partition lists without writing imperative code:

3. Predicate Filter Expressions

Filter expressions (enclosed in [?(...)]) test logical predicates against each candidate node. Common filter operators include equality (==), inequality (!=), numeric comparisons (<, <=, >, >=), and presence checks:

100% Client-Side Privacy & Security Guarantee

Pasting large enterprise payloads into arbitrary online query testers poses serious data exfiltration risks. Many web utilities send queries to remote servers for evaluation, where sensitive data can be logged, cached, or exposed. DevSandbox evaluates JSONPath queries strictly in memory using your browser's local JavaScript engine.

Our strict Content Security Policy prohibits unauthorized outbound requests. You can open Developer Tools (F12), inspect the Network tab, and verify that zero bytes leave your browser while querying documents.

Frequently asked questions

What is JSONPath?

JSONPath is a standardized query language for JSON documents, analogous to XPath for XML. It allows developers to selectively extract properties, nested structures, array slices, and filtered items using clean path expressions starting with $.

Does this JSONPath tester send my JSON to any server?

No. The JSONPath query evaluator runs 100% client-side in your browser using JavaScript. No document content or queries are ever transmitted over the network.

What operators does this JSONPath evaluator support?

It supports root ($), child property (.key or ['key']), recursive descent (..key), array indices ([0]), array slicing ([0:2]), wildcards (*), and comparison filter expressions ([?(@.price < 10)]).

How do I filter objects with nested properties in JSONPath?

Use predicate filter expressions enclosed in [?(...)]. The @ symbol refers to the current item being filtered, e.g. [?(@.author.name == 'Smith')] or [?(@.price < 20)].

What is the difference between dot notation and bracket notation?

Dot notation ($.store.book) works for standard alphanumeric property keys. Bracket notation ($['store']['book-title']) is required when keys contain hyphens, spaces, numbers, or special characters.