Skip to content

JSON Path Finder - Extract JSON Paths Online

Input JSON
Paths

Paths will appear here once you enter valid JSON.

Find the Path to Any Value

Paste JSON on the left and the right panel lists every path in the document, from $ down to each leaf, with its value and type. Instead of counting braces to work out that the city you want is $.orders[3].shipping.city, find the value in the list and copy its path. Type in the filter box to narrow the list by path or type, and click a row or its Copy button to copy the path.

Run a JSONPath Query

Type an expression into the query box and the table shows only the matching values and their paths. Supported syntax:

  • $.users[*].email: every user's email
  • $..id: every id key at any depth
  • $.items[0], $.items[-1], $.items[0:3]: index, last item, slice
  • $['first name']: keys with spaces or symbols
  • $.users[?(@.age > 30)]: filter with ==, !=, <, <=, >, >=
  • $.users[?(@.email)]: items that have a given key

Paths in Other Tools

Paths are shown in JSONPath form. Keys that are valid identifiers use dot notation and anything else uses brackets, so a key with a hyphen appears as $["content-type"]. Other tools spell the same location slightly differently:

  • jq: drop the $: .orders[3].shipping.city.
  • JavaScript: replace $ with your variable: data.orders[3].shipping.city. Bracketed keys work unchanged.
  • Python: every step needs brackets: data["orders"][3]["shipping"]["city"].
  • PostgreSQL jsonb: data #> '{orders,3,shipping,city}', or the SQL/JSON path '$.orders[3].shipping.city' with jsonb_path_query.

Filters support a single comparison or key check per expression. There is no && / || and no functions such as length(), so for more complex queries use jq or a JSONPath library. To browse a document visually, use the JSON tree viewer.

Related Tools

Frequently Asked Questions

What is a JSON path?
A string that points to one location in a JSON document. $ is the root, .name steps into an object key and [0] into an array index, so $.items[0].id is the id of the first item. Keys that are not plain identifiers use brackets: $["content-type"].
Which JSONPath syntax does the query box support?
The common core of RFC 9535: dot and bracket keys, [*] wildcards, .. recursive descent, negative indexes, slices like [0:3], unions like [0,2], and filters such as [?(@.price < 10)] or [?(@.email)]. A filter holds one comparison; && and || and functions like length() are not supported.
How do I use a path in jq or JavaScript?
For jq, remove the leading $: $.items[0].id becomes .items[0].id. In JavaScript, replace $ with your variable name: data.items[0].id. Bracketed keys such as ["content-type"] work the same way in both.
Can I filter the list of paths?
Yes. Type in the filter box above the list and only paths or types containing that text remain, which helps when a document has hundreds of paths. The filter matches text; for value conditions, use a JSONPath query instead.
Does this tool send my JSON to a server?
No. Your JSON is parsed and walked in your browser with no network requests.