How to find the path to a value
- Paste a document into the JSON box, or load an example below. The tree on the right appears as soon as the text is valid.
- Click any row. The panel underneath shows how to reach that node from the top of the document, with a Copy button beside each notation, plus the value itself.
- Lost in a big file? Type a key name or a value in Search keys and values, then click a result: the tree opens every parent of that node, selects it and scrolls to it.
Keyboard users can do the same: Tab into the tree, move with the arrow keys, open and close branches with Right and Left, and jump with Home, End, Page Up and Page Down. The selected row’s line is highlighted in the editor, which helps when the same key appears many times.
Five notations for one location
- JSONPath (
$.store.books[0].title) follows RFC 9535. Use it with JSONPath libraries, API gateways, Kuberneteskubectl -o jsonpathand test assertions. - JavaScript (
data.store.books[0].title) is ready to paste after a variable holding the parsed object. - Python (
data["store"]["books"][0]["title"]) works on the dict and list values thatjson.loadreturns. - jq (
.store.books[0].title) runs as a filter on the command line or in the expression box on this page. - JSON Pointer (
/store/books/0/title, RFC 6901) is what JSON Patch, JSON Schema$refand many validators use to name a location.
Array positions start at 0 in all five. The JSONPath cheat sheet and the jq cheat sheet go further than single paths.
Keys that need quoting
Real data has keys with spaces, dots, quotes, slashes, non-Latin scripts and even the empty string. Dot notation only works for simple names, so the finder switches to brackets whenever a key needs them: $['first.name'] in JSONPath, data["first.name"] in JavaScript, .["first.name"] in jq. Quotes and backslashes inside keys are escaped, and control characters are written as \n or \u0001.
A key spelled "0" and the first array item are different things, and each notation keeps them apart: $['0'] versus $[0], data["0"] versus data[0]. JSON Pointer has no quoting, so it escapes ~ as ~0 and / as ~1; a key named a/b~c becomes /a~1b~0c.
Some JSONPath implementations, including the popular jsonpath-plus library behind the expression box, treat characters such as [, ], ; and ^ as operators even inside quotes. The paths written here follow the standard, so a key full of brackets may need a different tool to query, but the path itself is correct.
Searching keys and values
Search looks at object keys and at scalar values: the text of strings, the digits of numbers exactly as written, and the words true, false and null. It ignores case unless you tick Match case. Untick Keys or Values to narrow it down, or tick Regex to use a regular expression such as ^user_\d+$.
Results arrive in document order with their JSONPath and a short preview. The first 1,000 are listed and the total is always counted; matching rows are underlined in the tree so you can see clusters at a glance.
Testing JSONPath and jq expressions
Pick JSONPath or jq and type an expression. Results update as you type, each with the path where it was found, and the matching rows are highlighted in the tree. Filters work too: $.store.books[?(@.price < 10)].title in JSONPath, or .store.books[] | select(.price < 10) | .title in jq.
For jq, the finder asks jq itself where each output came from, using its path() function. That works for anything that selects existing data, such as field access, iteration, select, .. and negative indexes. Filters that compute new values, like map(.price) or length, have no location; their results are listed without a path.
Big files, big numbers and privacy
Parsing, searching and queries run in a background worker, so a 5 MB file does not freeze the page, and the tree only draws the rows on screen. Documents with more than 200,000 nodes show the first 200,000 in the tree, while search and queries still cover everything.
Integers beyond 2^53 and long decimals keep their exact digits in the tree, the value panel and query results, where JSON.parse would quietly round them; the big integers guide explains why that matters. JSON with comments or trailing commas is read as JSON5. Nothing you paste is uploaded: the page works offline once loaded, as described on the privacy page.
Examples
Filter a bookstore with JSONPath
The classic Goessner bookstore with a filter expression: the two books under 10 are highlighted, and clicking a result selects its title in the tree.
{
"store": {
"books": [
{ "title": "Sayings of the Century", "author": "Nigel Rees", "price": 8.95 },
{ "title": "Sword of Honour", "author": "Evelyn Waugh", "price": 12.99 },
{ "title": "Moby Dick", "author": "Herman Melville", "price": 8.99, "isbn": "0-553-21311-3" }
],
"bicycle": { "color": "red", "price": 19.95 }
}
}$.store.books[?(@.price < 10)].title$.store.books[0].title = "Sayings of the Century"
$.store.books[2].title = "Moby Dick"Keys that need quoting
Dots, apostrophes, an empty key, a digit-only key, a slash and a tilde, and Japanese text. Searching for “name” finds a key and a tag value; click any row to see how each notation quotes its key.
{
"user profile": {
"first.name": "Ada",
"it's": "quoted",
"": "empty key",
"0": "a key that looks like an index",
"a/b~c": "slash and tilde",
"名前": "エイダ"
},
"tags": ["name", "admin"]
}name$['user profile']['first.name'] = "Ada"
$.tags[0] = "name"Find large orders with jq
A jq filter with select: each result keeps its location, so the matching order IDs are highlighted in the tree.
{
"orders": [
{ "id": "A-1001", "total": 42.5, "status": "shipped" },
{ "id": "A-1002", "total": 189.0, "status": "pending" },
{ "id": "A-1003", "total": 310.75, "status": "shipped" }
]
}.orders[] | select(.total > 100) | .id$.orders[1].id = "A-1002"
$.orders[2].id = "A-1003"Exact digits for big integers
Both IDs are larger than JavaScript numbers can hold exactly. The tree, the value panel and the query keep every digit.
{
"ledgerId": 9007199254740993,
"entries": [
{ "account": 12345678901234567890, "amount": "1520.50" }
]
}$..account$.entries[0].account = 12345678901234567890Common errors and how to fix them
| Error | Cause | Fix |
|---|---|---|
Trailing comma before '}'Explained | The pasted text has a comma after the last member, which strict JSON forbids. Without comments or other JSON5 hints the document is read as strict JSON. | Delete the comma (the error link jumps to it), or fix the whole file with the JSON formatter’s Fix it button. |
Invalid JSONPath: Unexpected "?" at character 0 | A filter expression is unfinished, for example $.items[?(@.price > ] with the value or a closing parenthesis missing, so the safe evaluator cannot read the filter at all. | Close every bracket and parenthesis and finish comparisons. JSONPath always starts with $. |
jq: Cannot index array with string ("title") | The filter asks an array for a field. In jq, .books.title fails when books is a list. | Iterate first: .books[].title, or pick one item with .books[0].title. |
Invalid regular expression: Unterminated group | Regex is ticked and the search text has a bracket or parenthesis that is not closed, or a backslash at the end. | Escape the character (( or [) or untick Regex to search for the text literally. |
No matches | Search ignores case but not spelling, and value search compares the decoded text of strings, so a search for “\u00e9” will not find é. | Search for the character as it appears to a reader, try a shorter fragment, or check that Keys and Values are both ticked. |
Frequently asked questions
What is the difference between JSONPath and JSON Pointer?
JSONPath is a query language: one expression can match many nodes with wildcards, recursive descent and filters. JSON Pointer names exactly one location with slash-separated steps and is used by JSON Patch and JSON Schema. For a single node both identify the same place.
Why does my path use brackets instead of dots?
Dot notation only accepts simple names made of letters, digits and underscores that do not start with a digit. Any other key, such as one with a space, a dot or a hyphen, must be quoted in brackets, so the finder does that automatically.
Can I paste JSON with comments?
Yes. If the text is not strict JSON but has comments, single quotes, trailing commas or unquoted keys, it is read as JSON5, and the status line says so. Lines in the editor are not linked to tree rows in that case.
Why does a jq result have no path?
Only filters that select existing data have a location. Filters that build new values, such as map, length, keys or object construction, produce data that does not exist anywhere in the input.
How large a file can I explore?
Files of several megabytes work well because the work happens in a background worker. The tree shows up to 200,000 nodes; search and queries cover the whole document regardless.
Is my JSON sent to a server?
No. The page parses, searches and queries your data in the browser, and the jq engine is WebAssembly bundled with the site. You can disconnect from the network after the page loads and everything keeps working.