Json Web Viewer
All tools

JSON Path Finder — get a node's path as jq, JSONPath, JS, or JSON Pointer

Click any value in a JSON tree and get back its exact path — in whichever notation the tool you're pasting it into actually expects — entirely in your browser.

A "JSON path" is just an address for a value inside a document: which object key or array index to follow, step by step, from the root. The catch is that there's no single standard way to write that address down — jq, JSONPath, plain JavaScript property access, and the JSON Pointer standard (RFC 6901) each use their own syntax, and pasting one notation where another is expected just fails. Json Web Viewer's tree view tracks the real path to whatever node is selected and can emit it in all four notations at once, so you don't have to hand-translate between them.

Select a value in the tree — the breadcrumb bar above it always shows the current path — then right-click the node (or use the breadcrumb's own copy button) and choose Copy path as… to get it in the notation you need.

Example — the email field of the third user in this document:

{
  "data": {
    "users": [
      { "id": 1, "name": "Ada Lovelace", "email": "ada@example.com" },
      { "id": 2, "name": "Grace Hopper", "email": "grace@example.com" },
      { "id": 3, "name": "Alan Turing", "email": "alan@example.com" }
    ]
  }
}

renders as the same path in all four notations:

jq:            .data.users[2].email
JSONPath:      $.data.users[2].email
JavaScript:    obj.data.users[2].email
JSON Pointer:  /data/users/2/email

Open this example in the editor →
The link above pre-loads the document above into Tree mode, with the breadcrumb path bar visible above the tree. Expand into users[2].email, right-click it, and try each Copy path as… option to see all four notations for yourself.

Frequently asked questions

What's the difference between JSON Pointer, JSONPath, and a jq path?

They're three different syntaxes for the same idea — "where is this value in the document" — used by different tools. JSON Pointer (RFC 6901) is a slash-separated path like /data/users/2/email, used by JSON Schema error locations and HTTP PATCH. JSONPath is a dollar-rooted query syntax like $.data.users[2].email, used by many JSON query libraries. jq uses its own dot-and-bracket syntax like .data.users[2].email, used specifically as input to the jq command-line tool. None of the three are interchangeable text — each only works when pasted into the tool that expects it.

Does finding a path upload my JSON anywhere?

No. The path is computed entirely in your browser from the tree you're already viewing. Your document is never sent to a server.

Can I copy the path straight to my clipboard?

Yes. Right-click any node in Tree mode and choose one of the four Copy path as… entries, or use the same menu on the breadcrumb bar above the tree — either copies the path in the notation you pick directly to your clipboard.