{ } JSON Workbench100% Private • Zero Server Uploads

"JSON Path Finder":{ }

Click any key in your JSON to get its path in JSONPath, JavaScript, Python, jq, JSON Pointer, and dot notation, or search by key or value to find where something lives. Runs 100% in your browser: nothing is uploaded.

What is a JSON path finder?

Deeply nested API responses make it slow and error-prone to write the access path by hand: one wrong index or a forgotten quote and you get undefined. A JSON path finder lets you click the value you want and copies a correct path for the language or tool you are using. It also handles keys that need quoting and searches the whole document by key or value, which is the fastest way to locate a field in a large payload.

Which notation should I use?

  • JavaScript / TypeScript: data.store.books[0].title, or optional chaining (data.store?.books?.[0]) for fields that may be missing.
  • Python: data["store"]["books"][0]["title"] after json.loads.
  • jq (command line): jq '.store.books[0].title' file.json.
  • JSONPath: kubectl -o jsonpath, AWS Step Functions, and many API testing tools.
  • JSON Pointer: JSON Patch operations and JSON Schema references.

How to use

  1. Paste JSON (or open a file, or load the sample). It appears as a collapsible tree.
  2. Click any key in the tree. Its path appears in six notations: JSONPath, JavaScript, Python, jq, JSON Pointer, and dot notation.
  3. Click the copy button next to the notation you need and paste it into your code or query.
  4. Or type in the search box to find every key or value that matches, then click a result to get its path.

Examples

One node, every notation

Input
{ "store": { "books": [ { "title": "JSON Basics" } ] } }
→ click "title"
Output
JSONPath     $.store.books[0].title
JavaScript   data.store.books[0].title
Python       data["store"]["books"][0]["title"]
jq           .store.books[0].title
JSON Pointer /store/books/0/title

Keys that need quoting

Input
{ "open-hours": { "mon-fri": "9-17" } }
Output
JSONPath     $["open-hours"]["mon-fri"]
JavaScript   data["open-hours"]["mon-fri"]
JSON Pointer /open-hours/mon-fri

FAQ

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

Paste the JSON, then click the key you want in the tree, or search for the key or value. The tool shows the full path from the root in JSONPath, JavaScript, Python, jq, JSON Pointer, and dot notation, each with a copy button.

What is the difference between JSONPath and JSON Pointer?

JSONPath ($.store.books[0].title) is a query language: it can also select many nodes with wildcards and filters, and is used by tools like kubectl and AWS Step Functions. JSON Pointer (/store/books/0/title, RFC 6901) addresses exactly one node and is used by JSON Patch and JSON Schema $ref.

Why are some keys written in brackets?

Keys that are not valid identifiers (with dashes, spaces, or a leading digit) cannot use dot access, so they are quoted in brackets: data["open-hours"]. JSON Pointer escapes ~ as ~0 and / as ~1.

Can I test a JSONPath query?

Yes, use the JSONPath tester to run a query (including wildcards and filters) against your JSON and see what it returns.

Is my JSON uploaded?

No. Parsing, the tree, and path generation all run in your browser. Nothing is uploaded.

Related tools