JSON Path Finder

Paste JSON, click the value you need, copy the exact path to reach it in your code.

runs in your browserno uploadno sign-up

Tree

The tree appears here.

Click a key in the tree, or type a path such as $.order.items[0].sku or $.order.items[*].qty.

Why a path finder

Deeply nested API responses make it easy to get an accessor slightly wrong — one level missing, the wrong array index, a key with a dash that needs bracket notation. Click any key in the tree and the tool writes the path for you in five syntaxes: JSONPath ($.order.items[0].sku), JavaScript (data.order.items[0].sku), Python (data["order"]["items"][0]["sku"]), jq (.order.items[0].sku) and PHP.

Keys that are not valid identifiers — containing spaces, dashes or starting with a digit — are automatically written with bracket notation and quotes, so the snippet works when pasted.

Testing a path

You can also type a path to check what it returns. Dot and bracket notation, quoted keys and array indexes are supported, and [*] (or .*) selects every element of an array or every value of an object, so $.order.items[*].sku lists each SKU. The matches show their exact, concrete paths.

Recursive descent (..) and filter expressions ([?(@.price > 10)]) from the full JSONPath standard (RFC 9535) are deliberately not evaluated here: the goal is to find a precise path, and the tool says so rather than returning a partial answer.

Frequently asked questions

What is JSONPath?

A query syntax for JSON, standardised in 2024 as RFC 9535. $ is the root, .name or ["name"] selects a key, [0] selects an array item and [*] selects all children. It is used by tools such as Kubernetes kubectl -o jsonpath, AWS Step Functions, Postman tests and many JSON libraries.

How do I find the path of a value in JSON?

Paste the JSON, expand the tree to the value, and click its key. The path appears below in JSONPath, JavaScript, Python, jq and PHP, each with a Copy button. Use the filter box to locate a key or value in large documents.

Why does my path use brackets instead of dots?

Dot notation only works for keys that are valid identifiers. A key like "line items", "content-type" or "2fa" must be written as ["line items"] in JSONPath and JavaScript, so the tool switches automatically.

Do array indexes start at 0?

Yes, in JSONPath, JavaScript, Python, jq and PHP the first element is [0]. (XPath and some older JSONPath dialects differ, but RFC 9535 is zero-based.)

Is my JSON sent anywhere?

No. Parsing, the tree and path evaluation all run in your browser.