deftools.io JSON Tools

JSONPath Explorer

Query JSON with JSONPath expressions ($.store.book[*].author, $.users[?(@.age>18)]). Inline engine, no libraries. Live results, path highlighting, sample data, deep-linking.

$
Try:
0 B
0 matches
JSONPath syntax cheatsheet
$root object
.keychild by key (dot notation)
['key']child by key (bracket, supports special chars)
*all children of current node
..keyrecursive descent (any depth)
[n]array index (negative = from end)
[a:b]array slice (Python-style, optional step)
[a,b,c]union of multiple indices/keys
[?(expr)]filter expression
@current node (inside filters)
@.keyfield of current node (filter)
== != < >comparison operators (filters)
&|| &&logical or / and (filters)
=~ /re/regex match (filters)
Notes: filters support comparison of numbers, strings, booleans, and null. String literals use single or double quotes. This is an inline engine — a subset of RFC 9535 is supported (no script expressions ($..a), no parent ^). Tested against the canonical goessner.net examples.
Copied!

About this tool

JSONPath is a query language for JSON — think of it as XPath for JSON documents. Use it to extract specific values from deeply nested APIs, config files, or response payloads without writing imperative traversal code.

Example: given { "store": { "book": [{ "title": "Moby Dick", "price": 8.99 }, { "title": "Dune", "price": 14.99 }] } }, the expression $.store.book[?(@.price<10)] returns only books under $10. The expression $..author finds every author at any depth.

Common uses: filtering API responses in Postman/curl scripts, extracting fields from Kubernetes manifests, slicing test fixtures, and auditing config files for specific keys.

FAQ

What is the difference between $..key and $.key?

<code>$..key</code> uses recursive descent — it searches every nested object and array for the key, at any depth. <code>$.key</code> only looks at the immediate child of the root. Use <code>$..</code> when you don't know how deep the field is buried.

Why does my filter expression fail?

Check that you're using <code>@</code> (not <code>$</code>) to refer to the current node inside a filter. Also verify operator syntax: <code>==</code> not <code>=</code>, <code>=~</code> before regex literals, string values need quotes. The error message shows the exact position of the problem.

Does this support the full RFC 9535 standard?

This engine implements the most widely used subset: dot/bracket notation, wildcards, recursive descent, slices, unions, and filter expressions with comparison and regex operators. Script expressions (<code>$(...)</code>) and the parent operator (<code>^</code>) are not supported — those are rarely used in practice and few implementations include them.

Can I use this tool from the command line?

The JSONPath logic is all inline JavaScript with zero dependencies. You can copy the engine functions (tokenize, evaluate, evalFilter) and use them in Node.js, Deno, or Bun with no extra packages.

More json tools

Copied!