FormatterHQ

JSON Path Finder

Paste JSON, click any node in the tree and copy its path in six syntaxes: JSONPath, JavaScript, Python, PHP, jq and JSON Pointer. The selected value is shown too.

Loading tool…
Ready.

How to use the JSON Path Finder

  1. Paste your JSON into the JSON editor, or click Sample.
  2. Click any key or value in the Tree panel. Use the filter box to narrow large documents.
  3. Read the path in the syntax you need (JSONPath, JavaScript, Python, PHP, jq or JSON Pointer) and the node's value below it.
  4. Click Copy next to a path, or Copy all paths to get every leaf path at once.

Find any path with the JSON path finder

The JSON path finder turns a pasted document into a clickable tree. Select any node, whether a leaf value, an object or an array, and the tool shows its path in six syntaxes at once, together with the node's value. It saves you from counting array indexes by hand in a long API response or guessing how to quote a key that contains spaces.

Six path syntaxes, one click

For this sample:

{
  "store": {
    "books": [ { "title": "Dune", "price": 9.99 } ],
    "open hours": { "mon-fri": "9-18" }
  }
}

Clicking "Dune" and then "9-18" gives:

SyntaxPath to "Dune"Path to "9-18"
JSONPath$.store.books[0].title$.store['open hours']['mon-fri']
JavaScriptdata.store.books[0].titledata.store["open hours"]["mon-fri"]
Pythondata["store"]["books"][0]["title"]data["store"]["open hours"]["mon-fri"]
PHP$data['store']['books'][0]['title']$data['store']['open hours']['mon-fri']
jq.store.books[0].title.store["open hours"]["mon-fri"]
JSON Pointer/store/books/0/title/store/open hours/mon-fri

Keys that are valid identifiers use dot notation; keys with spaces, hyphens or leading digits switch to bracket notation automatically, with the quoting each language expects. The variable names data and $data are placeholders; replace them with your own.

When each syntax is useful

  • JSONPath for API testing tools, Kubernetes kubectl -o jsonpath and data mappers. Test full expressions with filters in the JSONPath tester.
  • JavaScript, Python and PHP to paste straight into code that reads a decoded response.
  • jq for shell pipelines such as curl … | jq '.store.books[0].title'.
  • JSON Pointer for JSON Schema $ref values and the path field of JSON Patch operations. Slashes in keys become ~1 and tildes become ~0.

Working with large documents

The tree updates as you type. Objects show their key count and arrays their length, like {3} or [25], so you can see structure at a glance. Type in the filter box to hide branches that do not contain your search text, which is the fastest way to locate a field such as email in a response with hundreds of lines.

You can also click an object or array node rather than a leaf. The paths then point at the whole container, and the Value row shows its JSON (shortened after about 300 characters), which helps when you need the path to a list you plan to loop over, such as $.store.books.

Copy all paths copies the JSONPath of every leaf value, one per line. That list is handy for documenting an API response, writing assertions for every field, or checking which fields exist before mapping them to a database.

Edge cases

  • The root is selectable: it is $ in JSONPath, . in jq and the empty string in JSON Pointer.
  • Quotes inside keys are escaped in the single-quoted JSONPath and PHP forms, for example ['it\'s'].
  • Empty objects and arrays appear as nodes too, so you can still copy their paths.
  • Invalid JSON clears the tree and shows the parser error. Fix it with the JSON formatter first if the document is minified or broken.

Privacy

Parsing and path generation happen in your browser. The JSON you paste, which often includes tokens or personal data from real API responses, is not uploaded.

Frequently asked questions

How do I find the JSONPath of a value?
Paste the JSON, then click the value in the tree. The JSONPath row shows its path, such as $.store.books[0].title, and the Copy button next to it copies the path to your clipboard.
What is the difference between JSONPath and JSON Pointer?
JSONPath is a query language that starts with $ and supports wildcards and filters. JSON Pointer (RFC 6901) is a plain slash-separated address like /store/books/0/title that points to exactly one value and is used by JSON Patch and $ref.
How are keys with spaces or dashes handled?
They switch to bracket notation with the right quoting for each language, for example $.store['open hours'] in JSONPath or data["open hours"] in JavaScript. JSON Pointer keeps them as they are, since only / and ~ need escaping there.
Can I get a list of every path in the document?
Yes. Click Copy all paths to copy the JSONPath of every leaf value, one per line. Empty objects and arrays are included as leaves.
Does it evaluate JSONPath expressions?
No, it generates paths from the value you click. To run an expression with wildcards or filters against a document, use a JSONPath tester.

Last updated October 3, 2026

Related tools

Image Average Color Finder Find the average and dominant colour of an image — useful for placeholders, card backgrounds and theme colours. Runs in your browser. JSON Pretty Print Pretty print JSON online with a 4-space default, 2 or 3 spaces or tabs, and see the matching JavaScript, Python, PHP and jq commands. JSON Reader Open a .json file in your browser and read it as a collapsible tree, a sortable table or a graph, with a filter to find any value. JSON Schema to Sample JSON Generate realistic fake JSON that conforms to a JSON Schema — formats, enums, ranges and required fields respected. JSON Schema Validator Validate JSON against a JSON Schema (draft-07, 2019-09, 2020-12) with Ajv and get every error with its path and rule. JSON Serialize Online Serialize JSON into its most compact transport form, optionally wrapped as an escaped string literal for storage or messaging. JSON Sorter Sort JSON keys alphabetically at every level, ascending or descending. Optionally sort arrays of values for clean, comparable output. JSON Stringify Online Stringify JSON into an escaped string literal, exactly like JSON.stringify. Ready to embed JSON inside JSON, code or config values. JSON Syntax Highlighter Syntax highlight JSON with light, dark or Monokai themes and copy the colourised HTML for blogs, docs and slides. JSON to JSONL Converter Convert a JSON array to JSON Lines (JSONL / NDJSON), one record per line, for streaming, logging, BigQuery and ML datasets. JSON to One Line Convert multi-line JSON to a single line. Collapse formatted JSON for logs, CLI arguments, environment variables and CSV cells. JSON to PHP Array Converter Convert JSON to a PHP array literal with short [] or array() syntax, ready to paste into Laravel config files, seeders and tests.