Skip to content
Toolcroft

Developer Tools

JSON Path Tester - Test JSONPath Expressions Online

Test JSONPath expressions against any JSON document in real time. Supports dot notation, wildcards, recursive descent, array slices, and filter expressions.

3 matches
$.store.book[0].title
"Atlas"
$.store.book[1].title
"Moby Dick"
$.store.book[2].title
"Sword"

What is JSONPath?

JSONPath is a query language for JSON, analogous to XPath for XML. It lets you extract specific values from a JSON document using a concise path expression. Defined by Stefan Goessner in 2007 and widely used in tools like Kubernetes, AWS Step Functions, and Gatling.

Supported syntax

ExpressionMeaning
$Root element
.keyChild key
['key']Bracket child (useful for keys with dots)
[n]Array index (negative counts from end)
[*]All children (wildcard)
[0:2]Array slice
..keyRecursive descent: find key anywhere
[?(@.price > 10)]Filter expression

Filter operators

Filter expressions use @ to refer to the current element. Supported operators: ==, !=, >, <, >=, <=.

JSONPath vs. JMESPath

FeatureJSONPathJMESPath
OriginStefan Goessner, 2007Amazon Web Services, 2013
StandardizationRFC 9535 (2024)RFC 9901 (draft)
Recursive descent..keyNot supported
Filter syntax[?(@.age > 18)][?age > \`18\`]
Used inKubernetes, Gatling, Newtonsoft.JsonAWS CLI, Terraform, Ansible

Real API examples

Typical JSONPath queries against a REST API response:

  • $.data[*].id - extract all IDs from a paginated list
  • $.items[?(@.status == "active")].name - filter active items by name
  • $..href - recursively find all href values in a HAL response
  • $.meta.pagination.total - drill into nested metadata