JSONPath Tester

Test and evaluate JSONPath expressions against your JSON data in real time. Enter your JSON, write a JSONPath query, and instantly see matching results with syntax highlighting and match count. Supports dot notation, bracket notation, wildcards, recursive descent, array slicing, and filter expressions. Free, runs entirely in your browser -- no data ever leaves your machine.

Features

Real-Time Evaluation

JSONPath expressions are evaluated as you type. See results instantly without clicking a button -- the output updates live with every keystroke in both the JSON and path inputs.

🎨

Syntax Highlighting

Results are displayed with color-coded syntax highlighting that distinguishes strings, numbers, booleans, null values, and object keys, making complex JSON output easy to read.

🔎

Filter Expressions

Use powerful filter expressions to select array elements based on conditions. Check for property existence, compare values with ==, !=, >, <, >=, and <= operators.

📚

Built-in Cheatsheet

A comprehensive quick reference table is built right into the page. Look up JSONPath syntax, operators, and examples without leaving the tool or opening another tab.

About JSONPath

JSONPath is a query language for extracting data from JSON documents, originally proposed by Stefan Goessner in 2007 as the JSON equivalent of XPath for XML. It provides a concise syntax for navigating nested JSON structures and selecting specific values, arrays, or objects without writing custom parsing code. JSONPath is widely used in API testing tools, data pipelines, configuration management, and anywhere developers need to extract specific data from complex JSON responses.

Why Use a JSONPath Tester?

Writing JSONPath expressions can be tricky, especially for deeply nested or complex JSON structures. A JSONPath tester lets you experiment with different expressions and immediately see the results, making it much faster to build the correct query. Instead of writing code to test each expression, you can paste your JSON, try different paths, and refine your query interactively. This is particularly valuable when working with large API responses, Kubernetes manifests, Terraform state files, or any complex JSON data.

How This Tool Works

Paste your JSON into the input pane and type a JSONPath expression in the path field. The tool parses your JSON, evaluates the JSONPath expression against it, and displays the matching results in real time with syntax highlighting. The match count shows how many values were found. Everything runs entirely in your browser -- no data is ever sent to a server. Use the preset examples to quickly explore common JSONPath patterns, or consult the built-in cheatsheet for syntax reference.

Common Use Cases

Frequently Asked Questions

What is JSONPath?
JSONPath is a query language for JSON, similar to XPath for XML. It allows you to extract specific values from a JSON document using path expressions. JSONPath expressions start with $ (representing the root element) and use dot notation or bracket notation to traverse the JSON structure. It supports wildcards ([*]), recursive descent (..), array slicing ([start:end]), and filter expressions ([?(@.key==value)]). JSONPath was originally proposed by Stefan Goessner in 2007 and has since been adopted by many tools and libraries across different programming languages.
How do I use JSONPath expressions?
Start with $ to represent the root of your JSON document. Use dot notation ($.key) or bracket notation ($['key']) to access object properties. Use [n] for array indices (zero-based), [*] to select all elements, [start:end] for array slices, ..key for recursive descent (finding a key anywhere in the tree), and [?(@.key)] for filter expressions. For example, $.store.book[*].author selects the author of every book in the store, and $.store.book[?(@.price<10)] selects books cheaper than 10.
What is the difference between JSONPath and XPath?
JSONPath is to JSON what XPath is to XML. Both are query languages for navigating hierarchical data structures. JSONPath uses $ for the root element (XPath uses /), dot notation for child access (XPath uses /), .. for recursive descent (XPath uses //), and [?()] for filters (XPath uses []). JSONPath is simpler because JSON has fewer node types than XML -- there are no attributes, namespaces, processing instructions, or text nodes. JSONPath also uses JavaScript-style array indexing (zero-based) and supports negative indices.
How does recursive descent (..) work in JSONPath?
Recursive descent ($..key) searches the entire JSON tree for all occurrences of the specified key, regardless of how deeply nested they are. For example, $..name will find every "name" property at every level of the JSON structure. This is useful when you want to extract values from deeply nested or inconsistently structured JSON without specifying the full path. Be aware that recursive descent can return many results for large documents, as it traverses every object and array in the tree.
How do JSONPath filter expressions work?
Filter expressions use the syntax [?(@.key op value)] to select array elements that match a condition. The @ symbol refers to the current element being evaluated. You can check for property existence with [?(@.key)], or use comparison operators: == (equals), != (not equals), > (greater than), < (less than), >= (greater or equal), and <= (less or equal). For example, $..book[?(@.price<10)] selects all books with a price less than 10, and $..book[?(@.isbn)] selects books that have an ISBN property.
What is array slicing in JSONPath?
Array slicing uses the syntax [start:end] to select a range of elements from an array. The start index is inclusive and the end index is exclusive, similar to Python slicing. For example, $[0:3] selects the first three elements (indices 0, 1, 2). You can omit start to begin from the beginning ($[:3]) or omit end to go to the end ($[2:]). Negative indices count from the end of the array, so $[-2:] selects the last two elements. This is useful for pagination, selecting subsets, or working with ordered data.
Is my JSON data safe when using this tool?
Yes, completely. This JSONPath tester runs entirely in your browser using client-side JavaScript. Your JSON data is never sent to any server, never stored, and never logged. All parsing and evaluation happens locally on your machine. You can verify this by checking your browser's network tab -- no data is transmitted when you test expressions. This makes the tool safe to use with sensitive or proprietary data.

Explore More Developer Tools

Check out our other free developer tools. Format JSON, generate Kubernetes manifests, parse AWS ARNs, decode JWTs, and more -- all from your browser with no sign-up required.

JSON Formatter → K8s YAML Generator →