JSONPath tester

Write a path and watch the matches update as you type.

About & FAQ ↓
JSON input
Waiting for input.
Matches

Supports $ .key ['key'] [0] [*] [1:5] .. and filters like [?(@.price < 10 && @.inStock)].

Reference
JSONPath tester

About the JSONPath tester

JSONPath is to JSON what XPath is to XML: a compact way to reach into a document and pull out the parts you want. This tester evaluates an expression against your payload as you type, so you can build a path incrementally instead of guessing. Notably, filter expressions are parsed rather than handed to eval() — a pasted expression can never execute code in your browser.

01

Live results

Matches update as you type, so a path can be built up piece by piece instead of guessed.

02

Full expression support

Wildcards, slices, unions, recursive descent and filters with comparisons and boolean operators.

03

No eval, ever

Filter expressions are parsed rather than executed — pasting one can never run code in your browser.

04

Match paths

Optionally return the path to each match, not just the value, so you can see where it came from.

How to use it

  1. Paste your JSON on the left.
  2. Type a path in the Path box — start with $ and build up, for example $.store.book[?(@.price < 10)].title.
  3. Read the matches on the right; tick "Show match paths" to see where each one came from.

Questions

Which JSONPath syntax is supported?

Root ($), child access (.key and ['key']), array indices including negatives, wildcards ([*] and .*), slices ([1:5]), unions ([0,2]), recursive descent (..), and filters with ==, !=, <, <=, >, >=, =~ combined with && and ||.

Is it safe to paste a filter expression?

Yes. Most JSONPath libraries implement filters by calling eval() or new Function(); this one parses the comparison itself, so no part of your expression is executed as code.

Why does my path return nothing?

The status line says "No matches" rather than failing, which usually means a key name is misspelled or you are filtering on a value type that does not match — for example comparing a string to a number.