JSONPath Tester (Query JSON)
Test JSONPath queries against JSON samples. Supports recursive descent, slice, basic filters. Great for picking data from API responses, debugging LLM structured output.
JSONPath syntax
| $ | Root object |
| $.foo / $["foo"] | Property foo |
| $.foo.bar | Nested property |
| $[0] | First array element |
| $[-1] | Last element |
| $[*] | All elements |
| $[0:3] | Slice 0..2 |
| $..price | Recursive — every `price` at any level |
| $.items[?(@.price > 100)] | Filter (subset) |
Test JSONPath queries against a JSON sample. Implements a JSONPath subset (RFC 9535 draft). Pick data from API responses, debug LLM structured output.
What is JSONPath?
JSONPath = "XPath for JSON". A query syntax to extract slices of data from JSON objects/arrays. Common in:
- Postman: API response assertions —
$.data.users[0].id === 1. - jq (CLI): similar patterns for command-line JSON.
- AWS CLI:
--query 'Reservations[*].Instances[*].PublicIpAddress'. - OpenSearch / Elasticsearch: query nested fields.
- LangChain / LLM: extract structured output from LLM responses.
Syntax cheat sheet
$— root.$.fooor$["foo"]— property.$[0]— index,$[-1]— last.$[*]— all elements/properties.$[0:3]— slice.$..price— recursive descent (everypriceat any level).$.items[?(@.price > 100)]— filter.
Real-world example
// API response
{
"store": {
"books": [
{ "title": "AI for Everyone", "price": 350000 },
{ "title": "Sapiens", "price": 280000 }
]
}
}
// Get all titles:
$.store.books[*].title // ["AI for Everyone", "Sapiens"]
// Books with price > 300k:
$.store.books[?(@.price > 300000)]
// Recursive — every price in the document:
$..price // [350000, 280000] JSONPath vs JSON Pointer (RFC 6901)
- JSONPath: query language — flexible, supports wildcards and filters.
- JSON Pointer (
/foo/0/bar): points to a single location, no wildcards.
Who this is for
Backend devs, API integrators, anyone debugging JSON/YAML/CSV payloads or working with structured data.
FAQ
Is my sensitive data safe?
Yes. JSON/YAML/CSV you paste is NOT uploaded to any server. All processing happens locally in your browser.
Is there a size limit?
Browser RAM dependent. Files under 10MB run smoothly. Larger files may freeze the tab.
Related tools
See all tools →JWT Decoder
Decode JWT tokens — header, payload, claims with readable timestamps.
NEWJSON Formatter
Format / minify / validate JSON. Sort keys A-Z, custom indent, Ctrl+Enter shortcut.
NEWUUID / Hash / Base64 / URL
Bundle: UUID v4, SHA-256/512 hash, Base64 (URL-safe), URL encode.
NEWNumber Base Converter
Convert between bases 2-36 + ASCII codes. BigInt support. Useful for bitwise debugging, CS101, memory dumps.