nebxJSON
GitHub
Menu

JSONPath tester

Ln 1, Col 1

The result appears here.

Free tool · runs in your browser

JSONPath tester

Paste JSON and type a JSONPath expression to see what it matches, live. Filters, slices, unions, wildcards, recursive descent and the standard functions follow RFC 9535.

Selectors

$.a.b · $['a b'] · [0] · [-1] · [0,2] · [1:3] · [::2] · * · ..name

Filters

[?@.price < 10] · [?@.tag == 'x' && !@.hidden] · [?@.isbn] (has the key). ?( ) from older JSONPath works too.

Functions

length(@.name) · count(@.tags[*]) · match(@.id, 'a.*') (whole value) · search(@.title, 'json') (anywhere)

Shortcuts

Ctrl/⌘ Enter
Format
Ctrl/⌘ Shift M
Minify
Ctrl/⌘ F
Find in the editor
Ctrl/⌘ Alt [
Fold all

Questions

Which JSONPath syntax is supported?

The RFC 9535 standard: child and recursive selectors, wildcards, indexes including negative ones, slices with steps, unions, filters with ==, !=, <, <=, >, >=, &&, || and !, and the length, count, match, search and value functions. The leading $ is optional, and the older ?( ) filter form works too.

Why does my filter match nothing?

Comparisons between different types are false, so @.price < '10' (a string) never matches a number. Filters look at the children of what's before them: use $.items[?@.price < 10], not $.items.price[?…].

Can I copy a path from the data?

Yes. In the tree view, click any key to copy its path.

Is my data uploaded?

No. Everything is converted in your browser. Nothing you paste is uploaded or stored; only your layout and option choices are remembered.