JSONPath Evaluator

Use JSONPath Evaluator to query and extract data from a JSON. Create code and instantly share queries.

|
JSON Size: 0 B
Results: 0
Status: Ready
JSONPath Expression:
Input JSON
Query Results
Evaluation Result 0 matches
Enter a JSONPath expression and click Evaluate to see results.
Generate Code
// Enter JSONPath expression and JSON to generate code
JSONPath Syntax Cheatsheet
Token Description Example
$ Root element (starting point) $.store – access store object
@ Current node (used in filters) [?(@.price < 10)] – filter by price
. Child operator $.store.book – access book array
.. Recursive descent (search anywhere) $..author – find all authors
* Wildcard (all items/keys) $.store.* – all store properties
[n] Array index (0-based) $.store.book[0] – first book
[-n] Index from end $.store.book[-1] – last book
[start:end] Array slice $.store.book[0:2] – first two books
[a,b,c] Union of indices $.store.book[0,2] – books at index 0 and 2
[?()] Filter expression $.store.book[?(@.price > 10)]
Filter Operators
Operator Description Example
== Equal to [?(@.category == 'fiction')]
!= Not equal to [?(@.category != 'fiction')]
<, > Less than, Greater than [?(@.price < 10)]
<=, >= Less/Greater than or equal [?(@.price >= 8)]
&& Logical AND [?(@.price > 5 && @.category == 'fiction')]
|| Logical OR [?(@.category == 'fiction' || @.category == 'reference')]
Privacy First: Your JSON data and queries never leave your browser. All processing is performed locally using JavaScript. No data is sent to any server.

What does our JSONPath Evaluator do?

Our free online JSONPath evaluator is a highly robust JSON function evaluator with intuitive path expressions to query, extract, and transform JSON data. Our JSONPath tester makes working with JSON easy, whether you’re debugging APIs, analyzing JSON datasets, or creating data pipelines.

  • Live JSONPath Evaluation: Evaluate JSONPath expressions directly on your JSON data as you type, and get immediate results.
  • JavaScript Code Generator: Write a bunch of pre-written JavaScript code to be copied and pasted into projects.
  • Built-in Cheatsheet: Our all-in-one built-in cheatsheet for JSONPath syntax doesn’t let you forget any syntax tokens and operators.
  • Share Query Links: Create shareable URLs with your JSON and query. Ideal for group work and notes taking.
  • One-Click Copy: Generate codes or shareable links with a single click to copy query results, or shareable links.
  • Sample Data Included: Get instant sample JSON data to try and learn JSONPath without any hassles.

JSONPath Expression Examples

Here are some common JSONPath expressions you can use with the sample JSON data:

// Get all authors from books
$..author

// Get the first book title
$.store.book[0].title

// Get all book titles
$.store.book[*].title

// Get books with price less than 10
$.store.book[?(@.price < 10)]

// Get all properties of the store
$.store.*

// Get the last book
$.store.book[-1]

// Get the first two books
$.store.book[0:2]

// Get books by specific authors
$.store.book[?(@.author == 'Herman Melville' || @.author == 'Nigel Rees')]

Why Choose Our JSONPath Evaluator?

Our JSONPath evaluator stands out from other online tools with these unique advantages:

FeatureOur ToolOther Tools
Built-in cheatsheetRare
JavaScript code generatorLimited
Shareable query linksRare
No signup requiredVaries
100% browser-basedVaries
Modern UI designMost are dated

Also, don’t forget to try our JSON validator if you need to check JSON syntax before querying!

FAQs

What can our JSONPath Evaluator do?

Our free online JSONPath evaluator is a powerful tool that allows developers to query, extract and transform JSON data with intuitive path expressions. Our JSONPath tester makes working with JSON easy, whether it’s for debugging APIs, analyzing a JSON dataset, or creating data pipelines.

What is difference between JSONPath and JSONPath Evaluator?

You can test and run JSONPath expressions against your JSON data using a “JSONPath Evaluator” (our tool), which is an online tool. Displays the query results as they happen. The JSONPath is the name of the language used to write the query, and the JSONPath Evaluator is the program to which the query is fed and executed.

What is the difference between JSONpath and JSON validator?

A JSON Validator ensures that your JSON syntax is correct and reports errors. A valid JSON can be queried and extracted with path expressions by a JSONPath Evaluator (our tool). Imagine that JSON Validator was a spell checker and JSONPath was a search engine for JSON data. Use this JSON Validator.

Do you charge for the use of this tool?

Yes! The JSONPath Evaluator is 100% free and open source. There is no sign up, no account to sign up for, no payment required. Just open the page, paste in your JSON and get going with the queries.

Is the data in my JSON safe?

Absolutely! Everything is processed in your browser (using JavaScript). No server is ever contacted with your JSON data and queries. We have no access whatsoever to your data or log it.

How to share JSONPath queries?

Once you have entered your JSON and your JSONPath expression, click “Evaluate” and “Copy Link” in the share section. This results in a URL with encoded JSON and query. Only individuals with this link will be able to see and edit your query.

What is the name of the JSONPath tool you are using?

We use our JSONPath Evaluator for the current standard for JSONPath: RFC 9535. It does support the most common features of JSONPath such as filtering, slicing, wildcards and recursive descent.

Why doesn’t my JSONPath return any results?

Common causes include: 1) Your JSON structure is not found in the path; 2) You have a spelling mistake in the key names; 3) The key names of your JSON are case-sensitive; 4) Array indices are out of range; 5) Filter conditions don’t match any elements. If you don’t know the structure, try the $.. operator for a recursive search.

Calculators | Converters | Games | Generators | Random | Web Tools | Developer Tools