JSONPath Query
Query JSON with JSONPath expressions, including wildcards, recursive descent and simple filters. See exactly which nodes matched before you write the code.
path
examples
json0 ln / 0 ch
result
ready
local / nothing uploadedAbout this tool
JSONPath is to JSON what XPath is to XML: a small query language for reaching into a document. Instead of writing nested loops to find a value, you write an expression and see every node that matches.
How to use it
- Paste the JSON document.
- Type a JSONPath expression such as $.users[*].name.
- See every matched node in the result pane.
- Try an example if the syntax is unfamiliar.
Examples
Names of all users
$.users[*].name
["Ada","Grace"]
Filter by role
$.users[?(@.role == admin)]
[{"name":"Ada","role":"admin"}]Limits and notes
- JSONPath has no single formal standard, so syntax varies between implementations.
- This implementation supports child, index, wildcard, recursive descent and simple comparisons; functions such as length() are not included.
Frequently asked questions
- What does the dollar sign mean?
- It is the root of the document. Every expression starts there, for example $.items[0] for the first element.
- What does double dot do?
- Recursive descent. It searches the current node and every descendant, so $..id finds every id key at any depth.
- Why does my filter return nothing?
- Filters run against arrays. Check that the path before the filter selects an array and that the compared value is quoted correctly for strings.
Want the details? Read the full guide: Finding One Field in a Huge Response.
Related Tools
curl ConverterConvert curl commands into Python, JavaScript, Go, PHP, Ruby, Rust and Java code. Paste a request copied from your browser devtools and get working client code instantly.
HTTP Header AnalyzerPaste a response header set and see which security headers are missing or weak. Checks CSP, HSTS, frame protection, referrer policy and header disclosure.
JSON ValidatorValidate JSON syntax with detailed error messages. Catch trailing commas, missing brackets, and syntax errors instantly before sending payloads to your API.
JSON FormatterBeautify, validate, minify, and view JSON. Format messy API responses into readable code or compress it to save bandwidth, running safely in your browser.
JSON MinifierCompress JSON to a single line. Remove all unnecessary whitespace and line breaks to reduce payload size for production APIs without altering the underlying data.
JSON ViewerView JSON in an interactive, collapsible tree structure. Easily navigate massive API responses, expand specific nodes, and inspect deeply nested objects or arrays.
XML FormatterFormat and validate XML documents. Add proper indentation, catch malformed tags, and minify XML markup for optimized data transfer in SOAP APIs or RSS feeds.
HTML FormatterBeautify HTML markup. Apply consistent indentation and line breaks to unreadable or minified HTML, making it easier to review, debug, and maintain web pages.