JSON Path Finder
Query JSON data using JSONPath expressions with real-time results and match counting. All processing happens in your browser.
JSON Input
Results
How to Use the JSON Path Finder
Paste your JSON document into the left panel. The editor accepts any valid JSON — objects, arrays, or nested combinations. Once your JSON is loaded, enter a JSONPath expression in the path field at the top. Results update in real time with every keystroke, so you can refine your query interactively without pressing any button.
The right panel displays the matched values, along with a match count showing how many elements
the expression selected. This is especially useful when querying large arrays — you can confirm
at a glance that your filter expression is selecting the right subset of records. Use the
quick-insert buttons below the path field to insert common expressions like $.*,
$..[*], or filter templates, which speeds up exploration of unfamiliar JSON
structures.
Click Copy to copy the matched results to your clipboard as a JSON array. If the expression matches a single scalar value, that value is returned directly rather than wrapped in an array. The tool also highlights syntax errors in the path expression and distinguishes between "no match" (valid expression, zero results) and "invalid expression" (parse error), so you always know whether to adjust your JSON or your query. All processing runs locally in your browser — no data is uploaded, making it safe to use with confidential API payloads and production data samples.
What is JSONPath?
JSONPath is a query language for navigating and extracting data from JSON documents. It was originally proposed by Stefan Goessner in 2007, inspired by XPath — the path language used to query XML documents. Just as XPath lets you pinpoint any node in an XML tree, JSONPath lets you address any value, array element, or nested object in a JSON structure using a concise expression.
Every JSONPath expression starts with $, which represents the root of the
document. From there you navigate the structure using either dot notation or
bracket notation:
- Dot notation —
$.user.address.city— clean and readable for simple key access - Bracket notation —
$["user"]["address"]["city"]— required when keys contain spaces, hyphens, or special characters - Wildcard —
$.*or$[*]— selects all children of an object or array - Recursive descent —
$..— searches all levels of nesting, similar to XPath's// - Array slicing —
$[0:3]— selects elements by index range, following Python slice syntax - Filter expressions —
$[?(@.price < 10)]— selects elements matching a boolean condition
JSONPath has been standardised as RFC 9535 (2024), bringing consistent behaviour across implementations. This tool uses the jsonpath-plus library, which follows the Goessner specification with RFC 9535 extensions.
Common Use Cases
Extracting nested API response data is the most common reason developers reach
for JSONPath. Modern REST and GraphQL APIs often return deeply nested JSON with dozens of fields.
If you only need a specific value — say, every product ID in a paginated list response —
a single JSONPath expression like $.data.products[*].id extracts exactly that,
without writing any transformation code.
Filtering arrays by conditions is where JSONPath becomes especially powerful.
Suppose an API returns an array of orders and you need only the ones with status
"shipped". The expression $[?(@.status == "shipped")] returns the
matching subset immediately. You can combine conditions with && and
|| for more complex filters.
Debugging complex JSON payloads from webhooks or third-party integrations is
another high-value use case. When a webhook delivers a 200-field payload and you need to find
where a particular value lives, recursive descent ($..fieldName) searches the
entire document tree and returns every match regardless of depth.
Building and testing API transformations is also well-served here. Before writing transformation code in your backend, you can prototype the JSONPath expression interactively, confirm it selects the right data, then translate it into code in your language of choice. Pair this tool with our JSON Formatter to pretty-print raw payloads before querying, and with our JSON Validator to confirm the document is well-formed first. For a full introduction to JSONPath syntax and expressions, see our JSONPath Tutorial.
Best Practices & Tips
Always start your expression with $. The dollar sign is mandatory
— it anchors the expression to the root of the document. An expression without it is invalid.
If you are getting zero results, verify that your expression begins with $ and
that the key path matches the actual structure of your JSON.
Prefer dot notation for readability. Use $.user.name rather than
$["user"]["name"] whenever keys are simple identifiers. Reserve bracket notation
for keys that contain hyphens, spaces, or start with a digit — for example,
$["content-type"] or $["0-indexed-field"].
Use filter expressions for conditional array access. The syntax
$[?(@.field == value)] is concise but powerful. The @ symbol always
refers to the current element being tested. You can access nested fields too:
$[?(@.meta.active == true)] works across nested objects without needing multiple
passes.
Use recursive descent sparingly in production. The $.. operator
is excellent for exploration and debugging, but scanning an entire document tree can be slow on
very large JSON payloads. Once you have identified the exact path using recursive descent, pin
it to a specific path ($.data.items[*].id) in your production code for
predictable performance.
Validate your JSON before querying. A JSONPath expression running against malformed JSON will produce no results or throw an error. Use the JSON Validator to confirm your document is valid before building a query.
JSONPath Syntax Reference
$— Root object$.key— Child property$[0]— Array index$[*]— All array elements$..*— Recursive descent (all values)$[?(@.price < 10)]— Filter expression
FAQ
What is JSONPath?
JSONPath is a query language for JSON, similar to XPath for XML. It lets you extract specific values from JSON data using expressions like $.store.books[*].title.
Which JSONPath spec is used?
This tool uses the Goessner JSONPath specification via the jsonpath-plus library.
Is my data safe?
Yes. All querying happens in your browser. No data is sent to any server.
What is the difference between dot notation and bracket notation in JSONPath?
Dot notation ($.user.name) is the shorthand form and works for keys that are valid identifiers. Bracket notation ($["user"]["name"]) is more flexible and required for keys that contain spaces, hyphens, or start with a digit.
How do I filter array elements by a property value?
Use a filter expression: $[?(@.status == "active")] selects all array elements where the status field equals "active". The @ symbol refers to the current element being evaluated.