JSONPath Query Tester | Test JSONPath Expressions in the Browser
Paste JSON, type a JSONPath query, and the matched values and match count appear on the right. Supports root $, dot notation, [] brackets, wildcards, recursive descent .., filters ?(), and array slices.
💡 About this tool
Anyone who works with API responses knows the pain: you have a 200-line JSON blob and you just want every author, or only the items under a certain price. Writing a throwaway script to dig it out, then deleting it, gets old fast. JSONPath lets you express that extraction as a single line — but the gotcha is that the syntax behaves differently than you'd guess until you actually run it.
This tester runs your expression against the JSON you paste and shows exactly which elements matched, plus a count so you can sanity-check against what you expected. The example-query chips let you compare how [*], .., slices, and filters each behave on the same data. It's the kind of scratchpad that saves you from the "why is this returning nothing?" loop you hit when piping JSONPath through a CLI tool blind.
🧐 Frequently Asked Questions
Which syntax is supported?
Root $, dot notation ($.store.book), bracket notation [], wildcards * and [*], recursive descent .., filter expressions ?(@.price<10), array slices like [-1:] and [0:2], and union [0,1].
What comparisons work in filter expressions?
Against @.key you can use ==, !=, <, >, <=, and >=. For example, $.store.book[?(@.price<10)] keeps only the array items whose price is under 10.
Why does my query return 0 matches?
Usually a typo in a key name, applying a slice or filter to something that isn't an array, or an expression that doesn't start with $. Check the key spelling in your JSON first.
What happens if my JSON is invalid? If the input can't be parsed as JSON, a parse error is shown and the result box stays empty. Fix the brackets or commas and evaluation resumes.
Is matching case-sensitive?
Yes, key names are case-sensitive. Author and author are treated as different keys.
📚 Fun Facts
JSONPath was proposed around 2007 by Stefan Goessner, who borrowed the . and .. notation directly from XPath, the query language for XML. For years every library implemented the filter and union edges a little differently, which is why the same expression could return different results in Python's jsonpath-ng versus a JavaScript implementation. That changed in 2024 when JSONPath was standardized as RFC 9535, giving the grammar a common reference. Support still varies by library, so it's worth confirming an expression works in whatever runtime you'll deploy it to.