TheJSON

JSON Path Finder

Click any key or value in the tree to get $.path.to.value, ready to paste into your code or tests.

Four path formats

  • JSONPath$.projects[1].name, for jq-style queries, Postman tests and API assertions.
  • JavaScriptprojects[1].name, to paste straight into code.
  • Bracket notation["projects"][1]["name"], safe for keys with spaces or dashes.
  • JSON Pointer/projects/1/name, for JSON Patch and JSON Schema $ref.

When you need the path to a JSON value

Writing a Postman or Playwright assertion against a deeply nested API response, building a jq filter, pointing a JSON Patch operation at the right field, or wiring a mapping in an integration platform: all of them need an exact path, and hand-typing one through six levels of arrays is where typos creep in. Paste the response, switch to Tree, click the value and copy the path in the format your tool expects. The path bar above the tree shows all four at once.

Like every tool on TheJSON, this runs entirely in your browser. Nothing you paste is uploaded, logged or stored on a server, so it is safe to use with API responses that contain tokens or customer data.

Frequently asked questions

What is the difference between JSONPath and JSON Pointer?

JSONPath ($.a.b[0]) is a query language that can also express wildcards and filters; JSON Pointer (/a/b/0) is a plain RFC 6901 address for one value, used by JSON Patch and JSON Schema $ref. TheJSON gives you both for any node.

How are keys with spaces or special characters handled?

JSONPath and JavaScript output switch to bracket notation such as $["first name"] for keys that are not valid identifiers. JSON Pointer escapes ~ as ~0 and / as ~1, as the specification requires.

Are array indexes zero-based?

Yes, in every format. The first element of an array is [0] in JSONPath and JavaScript and /0 in JSON Pointer.

Related JSON tools