JSON Compare

JSON Tool

JSONPath Tester

Test JSONPath expressions to query and extract data from JSON documents.

JSONPath Expression
Examples
JSON InputInvalid
Loading editor...

Unexpected end of JSON input

Query Result
Loading editor...

About JSONPath

JSONPath is a query language for JSON, similar to XPath for XML. It allows you to extract specific values from JSON documents using path expressions.

JSONPath Syntax

ExpressionDescription
$Root object
.Child operator
..Recursive descent
*Wildcard (all elements)
[n]Array index
[start:end]Array slice
[?()]Filter expression

Examples

  • $.store.book[0].title - First book title
  • $.store.book[*].author - All book authors
  • $..price - All prices in the document
  • $.store.book[?(@.price < 10)] - Books under $10

Common Use Cases

  • Extracting specific fields from API responses
  • Filtering arrays based on conditions
  • Navigating deeply nested structures
  • Testing API response formats