JSONPath Tester — Query JSON Online
Click any key in the tree and its path lands in the Path box, ready to copy — no syntax to remember. Type an expression instead and every match lights up in the same tree as you type. Your document never leaves the browser.
Two ways to find a path
Point at it. Paste your JSON, expand the tree on the right and click the key you want. The Path box fills in with the normalised path — $.store.book[1].title — and Copy puts it on your clipboard.
Or query for it. Type a JSONPath expression in the same box. Matching nodes are highlighted and expanded in the tree, and the Matches tab lists every one with its path and value.
Supported syntax
$— the root of the document, and@for the current node inside a filter..nameand['name']— a child property, quoted when it contains punctuation...name— recursive descent: find that property at any depth.*— every child, as.*or[*].[0],[-1]— an index, counting from the end when negative.[0,2],['a','b']— a union of several selectors at once.[start:end:step]— an array slice, each part optional.[?(@.price < 10)]— a filter, with== != < <= > >=,&&,||,!, parentheses and=~ /regex/.
Reading the results
Each row in the Matches tab shows the normalised path of the match and a preview of the value. Click a path to copy it; click it in the tree to jump back to the node.Copy values puts every match on your clipboard as a JSON array, which is usually what you want to paste into a test; Copy paths gives you the list of locations instead.
Scroll back up and click through a document — the sample loads in one click.