Evaluation Options

About the JSONPath Tester and Evaluator

Working with massive JSON responses from APIs or databases can be overwhelming. Finding the exact piece of data you need buried ten levels deep in an object is like looking for a needle in a haystack. This is why JSONPath was created. It is a powerful query language for JSON, similar to what XPath is for XML. Our online JSONPath Evaluator was built to help developers write, test, and instantly validate these expressions without writing a single line of backend code.

This tool uses the highly reliable jsonpath-plus engine. As you type your query into the expression box, our tool evaluates it against your JSON payload in real-time. It highlights exactly what data was extracted and tells you the precise number of matches found. If you write an invalid query or paste broken JSON, the tool instantly catches the syntax error and displays a warning, saving you hours of frustrating debugging.

We built this JSONPath tester with extreme privacy in mind. Evaluating massive database exports or sensitive API logs online can be risky. That is why our entire querying engine runs strictly inside your web browser using client-side JavaScript. Your data is never uploaded, stored, or sent to any external server. You can safely evaluate your sensitive payloads with complete peace of mind.

Advanced Output Formats

Unlike basic evaluators that only return raw data, our tool features an Output Result Format dropdown that allows you to change *how* the data is returned. This is incredible for debugging.

  • Extracted Values: The default mode. Returns the actual JSON objects or strings that match your query.
  • JSONPaths: Instead of the data, this returns the exact dot-notation path to where the data lives (e.g., $['store']['book'][0]).
  • JSON Pointers: Returns the match locations formatted as standard RFC 6901 JSON Pointers (e.g., /store/book/0).

JSONPath Syntax Cheat Sheet

If you are new to writing expressions, here is a quick reference guide to the most common JSONPath operators to help you extract data fast:

  • $ : The root element to start every query.
  • . or [] : Selects a child node. Example: $.store.book
  • .. : Deep scan. Recursively searches everywhere for a key. Example: $..author
  • * : Wildcard. Selects all elements regardless of their names. Example: $.store.*
  • [n] : Array index. Selects an item at a specific position. Example: $..book[2]
  • [start:end:step] : Array slice operator. Example: $..book[0:2]
  • [?(<expression>)] : Filter expression. This is incredibly powerful. Example: $..book[?(@.price < 10)]

How to Use This Tool

  • Paste your raw JSON payload into the "Input JSON Data" box on the left.
  • Type your query into the "JSONPath Expression" input box at the top of the tool (e.g., $..book[*].author).
  • The tool will automatically evaluate your query and display the extracted arrays or objects in the right-side output box.
  • Check the status text below the editors to see exactly how many matches were found in your document.
  • If your query returns no results, or if there is a syntax error, the tool will alert you immediately.
  • Click the "Sample" button to load a complex dataset and a working filter query to see how it operates in real-time.

Frequently Asked Questions

What is JSONPath?

JSONPath is a standardized query language used to extract specific data from JSON documents. It works very similarly to how XPath extracts data from XML files. By using simple expressions and filters, developers can traverse massive JSON trees and return only the arrays or objects they actually care about.

How do I use JSONPath to filter an array?

You can filter arrays by using the filter expression syntax: [?(@.key == value)]. The @ symbol represents the current item being processed. For example, if you want to find all books in an array that cost less than 15 dollars, you would write: $..book[?(@.price < 15)].

Is this JSONPath evaluator safe and private?

Yes, your data is 100% private. This tool evaluates your expressions locally inside your browser using client-side JavaScript. We do not use backend servers to process your payloads, meaning your sensitive text is never uploaded, logged, or saved anywhere.

What is the difference between JSONPath and XPath?

They serve the exact same purpose, but for different data structures. XPath is used to navigate and query XML documents using a path-like syntax with slashes (/). JSONPath was created specifically to query JSON documents, replacing slashes with dots (.) and brackets ([]) to match natural JavaScript syntax.

Why is my JSONPath query returning an empty array?

If the output shows an empty array [], it means your JSON syntax is valid, and your query syntax is valid, but the path simply doesn't exist in your document. Double-check your spelling, ensure your casing is correct (JSON is case-sensitive), and make sure you aren't missing an array index in your path.