Path Tester

Path Tester

JSONPath tester online. Test JSONPath expressions against your data and see matched values instantly. Debug JSONPath queries free in your browser.

Quick paths:

JSON Input

0 lines Β· 0 chars

Loading editor...

Results (0 matches)

No results. Enter JSON and a JSONPath to query.

JSONPath Syntax:

ExpressionDescription
$Root object
.keyChild property
[0]Array index
.*All children
$.a.b.cNested path

Features

  • Test JSONPath expressions in real-time
  • See matched values instantly
  • Syntax highlighting for queries
  • Common pattern examples
  • Export results as JSON or array
  • Error messages for invalid paths

Common Use Cases

  • Extract specific values from complex JSON
  • Test API query selectors
  • Build data extraction pipelines
  • Filter large JSON datasets
  • Learn JSONPath syntax

Understanding JSONPath

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

Common syntax:

  • $ - Root element
  • .property - Access object property
  • [index] - Access array element
  • [*] - All array elements
  • .. - Recursive descent (search all levels)
  • [?(@.price < 10)] - Filter expression

Example: $.users[*].name gets all user names from an array.

Examples

Valid - Basic property access
JSON: {"user": {"name": "Alice"}}
Path: $.user.name
Result: "Alice"
Valid - Array access
JSON: {"users": [{"name": "Alice"}, {"name": "Bob"}]}
Path: $.users[*].name
Result: ["Alice", "Bob"]
Invalid - Invalid path
JSON: {"name": "Alice"}
Path: $.invalid
Result: null (path not found)

Frequently Asked Questions

What is $.users[*].name syntax?

$ is root, users is the array, [*] selects all elements, .name gets the name property from each.

How do I filter by value?

Use filter expressions: $.items[?(@.price < 100)] finds items with price less than 100.

Can I search recursively?

Yes! Use .. for recursive descent: $..name finds all "name" properties at any level.

What if the path doesn't exist?

You'll get an empty result or null, depending on the query. Check your JSON structure and path syntax.

Can I use it with APIs?

Yes! Test your queries here, then use JSONPath libraries in your code to extract data from API responses.