json-path-finder
A JSON path finder makes it trivial to extract the path expression for any value in a complex JSON document β click the value in the rendered tree, copy the resulting JSONPath ($.users[0].name) or JSON Pointer (/users/0/name) β instead of mentally counting array indices and tracing nested keys. The ZTools JSON Path Finder renders any JSON as an interactive tree, generates path expressions in both common syntaxes (JSONPath for jq/jsonpath libraries, JSON Pointer for RFC 6901 use cases like JSON Patch), supports search to find values matching a string, and tests path expressions live against the current document.
Use casesβ
Building a JSONPath query for a parsing toolβ
Need the path to extract "user.profile.email" from a deeply nested API response. Click the value; the path is on your clipboard. Saves five minutes of mental traversal.
Finding the path of every occurrence of a valueβ
Search for "ERROR" across a 10k-line JSON log. The finder shows every path where that value appears β useful for debugging and audit trails.
Constructing JSON Patch operationsβ
JSON Patch (RFC 6902) needs JSON Pointer paths. The finder generates RFC 6901 pointer syntax with one click β exactly what JSON Patch tools require.
Documentation for nested API responsesβ
Document an API response by listing the path to each meaningful value. Authors paste the JSON, click around, copy paths into the docs.
How it worksβ
- Paste your JSON β Any size, any depth. Validates first; malformed JSON gets an error before tree rendering.
- Tree-view renders the structure β Each node shows key + value. Arrays show indices [0], [1]. Objects show keys. Click triangles to expand/collapse subtrees.
- Click any value to get its path β Path renders in both JSONPath ($.users[0].name) and JSON Pointer (/users/0/name) syntaxes. Toggle between them; copy whichever you need.
- Optional: search for values β Type a search term; the finder lists every path whose value matches. Useful for "where does this string appear?" investigations.
- Test path expressions live β Type or paste a JSONPath; the finder evaluates it against the current document and highlights every match.
Examplesβ
Input: {"users":[{"name":"Alice"}]}
Output: Click "Alice" β JSONPath: $.users[0].name | JSON Pointer: /users/0/name
Input: Click [3] on a 100-element array
Output: $.items[3] | /items/3
Input: Search "ERROR" in a log JSON
Output: Lists 24 paths matching $.logs[].entries[].level where the value equals "ERROR".
Frequently asked questionsβ
What's the difference between JSONPath and JSON Pointer?
JSONPath ($.foo.bar[0]) is a query language with wildcards, filters, and recursion β used by jq and similar tools. JSON Pointer (/foo/bar/0) is RFC 6901, a simpler addressing scheme used by JSON Patch. Pick whichever your downstream tool expects.
Can JSONPath express things JSON Pointer can't?
Yes β JSONPath supports wildcards ($.users[*].name), filters ($.items[?(@.price > 10)]), and recursive descent ($..name). JSON Pointer is exact-path only.
How does it handle keys with dots or special characters?
JSONPath bracket notation handles them: $["my.key"]. JSON Pointer escapes them: /my.key (dot in key) β RFC 6901 only escapes / (~1) and ~ (~0). The finder generates the correct escaping automatically.
Does it support nested arrays?
Yes β the path includes every index. $.matrix[0][2] for the element at row 0, column 2 of a 2D array.
Will it generate paths for nonexistent or null values?
It only shows paths for values that exist in the document. To express "the path I would use if this were here", build the path manually following the JSONPath/JSON Pointer rules.
Tipsβ
- For jq queries, you usually want JSONPath syntax ($.foo.bar[0]).
- For JSON Patch operations, you need JSON Pointer syntax (/foo/bar/0).
- When exploring an unfamiliar API response, expand the tree fully and click around β fastest way to learn the shape.
- For document-driven tests (like contract tests), grab paths to assertion targets via this tool rather than typing them manually.
Try it nowβ
The full json-path-finder runs in your browser at https://ztools.zaions.com/json-path-finder β no signup, no upload, no data leaves your device.
Last updated: 2026-05-05 Β· Author: Ahsan Mahmood Β· Edit this page on GitHub