NEW!

JSONPath Query

Query and extract data from JSON using JSONPath expressions. Supports recursive descent, wildcards, filters, and array slicing. Free online tool.

100% Private & Secure

All processing happens locally in your browser. Your files never leave your device.

Client-Side Processing No Server Uploads No Registration Required
  • $ Root object
  • $.store.book[*] All items in array
  • $..author Recursive search
  • $.store.book[0] Array index
  • $.store.book[0:2] Array slice
  • $.store.book[?(@.price < 10)] Filter expression
  • $.store.book[*].title Multiple fields

JSON Input

Query Results

Paste JSON data on the left and enter a JSONPath query above.

All processing happens locally in your browser. Your data never leaves your device.

Keywords

jsonpathjson path queryjson path finderjson data extractionjsonpath online

Need something else?

How to use

1

Paste your JSON data into the left panel.

2

Type a JSONPath expression in the query bar (e.g., $.store.book[*].author).

3

Results appear instantly — matching values with their full paths.

4

Click any result to copy its value to clipboard.

Features

Full JSONPath Syntax

Supports root ($), child (.), recursive descent (..), wildcard (*), array index ([n]), slice ([n:m]), and filter expressions ([?(@.price<10)]).

Real-Time Query Execution

Results update instantly as you type the expression — no button click needed. Debounced for performance.

Path and Value Display

Each match shows the full JSONPath to the value and the value itself, making it easy to locate data in large documents.

Privacy-First Processing

All query execution runs locally in your browser. Your JSON data never leaves your device.

Why Choose This Tool?

Complete Privacy for Sensitive Data

API responses, database exports, and configuration files often contain tokens, credentials, or personal data. Because the JSONPath engine runs entirely in your browser, your data is never transmitted to any server. There is zero risk of interception, logging, or retention by third parties. Query production data and sensitive payloads with confidence.

Powerful Query Syntax

The tool supports the most-used JSONPath operators: dot notation for direct access, double-dot for recursive descent through nested structures, wildcards for iterating all elements, array slicing for ranges, and filter expressions for conditional matching. This covers the vast majority of real-world data extraction needs without requiring a full programming language.

Instant Feedback as You Type

Results update in real time as you modify the expression. There is no submit button, no loading spinner, and no round-trip to a server. This instant feedback loop makes it easy to explore unfamiliar JSON structures, experiment with different queries, and converge on the exact expression you need in seconds rather than minutes.

No Registration or Usage Limits

Start querying immediately — no account required, no daily caps, no file size restrictions. Whether you are exploring a 10-line config or a 50,000-line API response, the tool processes everything locally without throttling or premium tiers.

JSONPath Query Language: A Complete Guide for Data Extraction

JSONPath is a query language for extracting data from JSON documents, analogous to XPath for XML. It was originally proposed by Stefan Goessner in 2007 and has since become a de facto standard for navigating and filtering JSON structures in testing tools, API platforms, and data pipelines.

JSONPath Syntax Overview

Every JSONPath expression starts with $, which represents the root of the JSON document. From there, you navigate using dot notation ($.store.book) or bracket notation ($['store']['book']). The language provides several operators for traversing and filtering data:

  • $ — The root element. Every expression starts here.
  • .key — Access a child property by name.
  • .. — Recursive descent. Searches all descendants for the specified key.
  • * — Wildcard. Matches all elements in an array or all values in an object.
  • [n] — Array index. Access element at position n (0-based). Negative indices count from the end.
  • [n:m] — Array slice. Returns elements from index n to m (exclusive).
  • [?(@.field op value)] — Filter expression. Returns elements where the condition is true.

Practical Examples

Consider a JSON document representing an online bookstore. The expression $.store.book[*].author returns all author names. The expression $..price finds every price in the document regardless of nesting depth. The expression $.store.book[?(@.price<10)] returns only books costing less than 10. These patterns cover the majority of real-world data extraction tasks.

JSONPath vs XPath

JSONPath was designed as a JSON analog to XPath. While XPath navigates XML trees with axes (child, descendant, parent, sibling), JSONPath uses simpler notation suited to JSON's object/array structure. The .. operator is equivalent to XPath's // descendant axis. JSONPath lacks XPath's parent axis (..) and attribute selection, but these are rarely needed in JSON since there is no distinction between elements and attributes.

Use Cases

  • API testing: Extract specific fields from API responses to validate in automated tests (Postman, REST Assured).
  • Data pipelines: Filter and transform JSON data in ETL workflows.
  • Configuration: Extract values from complex config files without writing custom parsers.
  • Debugging: Quickly locate specific values in large, deeply nested JSON payloads.
  • Log analysis: Extract fields from structured JSON log entries.

Filter Expressions

Filter expressions are the most powerful feature of JSONPath. The syntax [?(@.field op value)] evaluates a condition for each element in an array. The @ symbol refers to the current element. Supported operators include ==, !=, <, <=, >, and >=. Values can be numbers, strings (quoted), booleans, or null. Multiple conditions are not natively supported but can be achieved by chaining queries.

JSONPath in API Testing and Automation

JSONPath is widely adopted in API testing frameworks. Postman uses JSONPath expressions in test scripts to extract and assert values from API responses. REST Assured (Java) integrates JSONPath directly into its fluent assertion API. Karate DSL uses JSONPath for matching response bodies against expected patterns. In these contexts, JSONPath expressions serve as concise, readable selectors that replace verbose code for navigating response structures. Learning JSONPath syntax transfers directly to improved productivity in any of these testing tools. Common patterns include extracting all IDs from a paginated response ($.data[*].id), checking for the existence of specific fields ($.errors), and filtering results by status ($.items[?(@.status=="active")]).

Advanced Query Patterns

Beyond basic navigation, several advanced patterns extend JSONPath's utility. Negative array indices access elements from the end: $[-1] returns the last element, $[-2] returns the second-to-last. Union selectors retrieve multiple named properties at once: $[0,2,4] returns elements at indices 0, 2, and 4. Recursive wildcards like $..* return every value in the entire document, useful for searching across unknown structures. Existence checks using filter expressions like [?(@.email)] return elements that contain a specific field, regardless of its value. Combining these patterns allows complex data extraction from deeply nested API responses without writing procedural code.

RFC 9535: The JSONPath Standard

In February 2024, the IETF published RFC 9535, formalizing JSONPath as an internet standard. This specification resolves ambiguities in Stefan Goessner's original proposal by defining precise semantics for every operator, establishing a formal grammar, and specifying how implementations should handle edge cases like empty results, type mismatches in filters, and Unicode normalization. The RFC also introduces the concept of "normalized paths" — canonical path representations that uniquely identify each matched node. Adopting RFC 9535-compliant implementations ensures consistent behavior across different programming languages and tools. While some older JSONPath libraries predate the RFC and may have minor behavioral differences, the standardization effort ensures that new implementations converge on a single, well-defined specification.

Frequently Asked Questions

What is JSONPath?

JSONPath is a query language for extracting data from JSON documents, similar to XPath for XML. It uses a simple syntax starting with $ (root) and supports dot notation, recursive descent, wildcards, array indexing, slicing, and filter expressions to navigate and extract specific values from complex JSON structures.

Is my JSON data secure when using this tool?

Yes. All query execution happens locally in your browser using JavaScript. Your JSON data is never transmitted to any server, logged, or stored. This makes the tool safe for querying API responses, configuration files, and any other sensitive data.

What JSONPath operators are supported?

The tool supports: $ (root), .key (child access), .. (recursive descent), * (wildcard), [n] (array index with negative support), [n:m] (array slice), and [?(@.field op value)] filter expressions with comparison operators (==, !=, <, <=, >, >=).

How does recursive descent (..) work?

The double-dot operator searches all descendants of the current node for the specified key. For example, $..price finds every property named 'price' at any depth in the document. This is useful when you know the field name but not its exact location in the hierarchy.

Can I use filter expressions to find specific values?

Yes. Filter expressions like [?(@.price<10)] return array elements where the condition is true. The @ symbol represents the current element. You can compare fields to numbers, strings (quoted), booleans, and null using ==, !=, <, <=, >, and >= operators.

How do array slices work?

Array slices use [start:end] syntax where start is inclusive and end is exclusive. [0:3] returns the first three elements. Omitting start defaults to 0, omitting end defaults to the array length. Negative indices count from the end: [-1] returns the last element.

Can I query large JSON files?

Yes. There are no file size limits. Query execution runs entirely in your browser, so the practical limit depends on your device's available memory. Most devices handle JSON documents of several megabytes without issues.

What happens with invalid expressions?

The tool shows a clear error message explaining the problem. Common issues include missing the $ root prefix, invalid bracket syntax, and unsupported operators. The error helps you fix the expression quickly.

How does JSONPath differ from jq?

JSONPath and jq both query JSON data, but they serve different contexts. JSONPath is a path-based query language designed for embedding in applications, testing frameworks, and web tools. jq is a command-line processor with its own Turing-complete language, supporting transformations, conditionals, and output formatting. JSONPath is simpler to learn and more portable; jq is more powerful for complex data transformations on the command line.

Can I use JSONPath to modify JSON data?

JSONPath is a read-only query language — it extracts and filters data but does not modify it. To modify JSON based on a path, you would typically use JSON Patch (RFC 6902) or JSON Merge Patch (RFC 7396), which reference locations within a document using JSON Pointer syntax. This tool focuses on the query and extraction use case.

Learn more