100% Client-Side • Free • Zero Server Transfer

JSONPath Evaluator & Query Tester Online

Test JSONPath expressions online with live results. Supports $, *, recursive descent, array slices and filters, plus a built-in syntax cheat sheet. Free.

Operator Reference
ExpressionDescriptionExample
$Root of the JSON document$
.keyChild member operator$.store.name
['key']Bracket notation (for keys with spaces)$['store name']
[n]Array subscript (0-indexed)$.items[0]
[-n]Array subscript from end$.items[-1]
[*]Wildcard — all items/properties$.items[*]
[a:b]Array slice from a (inclusive) to b (exclusive)$.items[0:3]
..Recursive descent — search all descendants$..name
[?(@.field op val)]Filter expression (==, !=, <, >, <=, >=)$..book[?(@.price < 10)]
In short

JSONPath is a query language for JSON, the equivalent of XPath for XML. Paste a document and an expression such as $.items[?(@.price < 10)].name into the left pane, and every matching node is listed in the right pane as you type.

JSONPath is a query language for JSON, filling the role XPath fills for XML. An expression selects nodes by path, wildcard, recursive descent, array slice, or filter predicate. JSON2X evaluates the expression against your document as you type and lists every match, which makes it a fast way to work out the right selector before committing it to code or a CI configuration.

What are the core JSONPath operators?

$ is the root of the document and every expression starts there. .key or ['key'] selects a child — use the bracket form when the key contains a space or a dash. * matches every child at that level. .. is recursive descent, so $..price finds every price at any depth. [0] indexes an array, [-1] counts from the end, and [1:4] takes a slice. [?(@.stock > 0)] filters, where @ is the element being tested.

How do filter expressions work?

A filter keeps the elements for which a predicate is true, with @ bound to the current element: $.products[?(@.price < 20)] returns the cheap products, and $.users[?(@.role == 'admin')].email returns just the admin emails. Predicates combine with && and ||, and existence is testable by naming the field alone — $.items[?(@.discount)] matches items that have a discount at all. Support for the more exotic filter syntax varies between implementations, so keep predicates simple if the expression has to run somewhere else.

JSONPath, jq, or JMESPath?

They overlap but are not interchangeable. JSONPath is the most widely embedded — it appears in Kubernetes, Spring, Postman, and many log pipelines — and is best at selection. jq is a full transformation language for the command line: it can reshape, aggregate, and construct new documents, which JSONPath cannot. JMESPath, used by the AWS CLI, sits between the two with a stricter specification. Use JSONPath when your target platform already speaks it; reach for jq when you need to transform rather than just extract.

How to use the JSONPath Tester

Takes under a minute. Nothing is uploaded — every step runs in this browser tab.

  1. Paste your document

    Put the JSON you want to query into the left-hand input pane.

  2. Write an expression

    Enter a JSONPath expression beginning with `$`, the root. Start broad — `$..name` — then narrow it.

  3. Read the matches

    The right-hand pane lists every matching node with its resolved path, updating live as you edit the query.

  4. Copy the working selector

    Once the match set is right, copy the expression into your code, your jq-adjacent tooling, or a CI assertion.

When to use it

  • Finding the exact path to a value buried deep in an API response
  • Extracting one field from every element of a large array
  • Writing an assertion for a contract or integration test
  • Configuring a log pipeline or monitoring rule that selects JSON fields
  • Exploring an unfamiliar payload faster than by scrolling through it

Step-by-step guides for this tool

Task-specific walkthroughs covering the most common ways this tool gets used.

Searches this page answers

  • jsonpath tester online free
  • free jsonpath evaluator
  • online jsonpath tester
  • test jsonpath expression
  • jsonpath cheat sheet
  • query json online
  • json query tool online
  • jsonpath filter examples

Frequently Asked Questions

What is JSONPath?

JSONPath is a query expression language for JSON, analogous to XPath for XML. It allows you to filter, select, and extract nodes from deeply nested structures.

What are common JSONPath syntax operators?

$ denotes the root object; @ represents the current node; * matches all elements; .. performs recursive descent; [start:end:step] slices arrays; [?(@.price < 10)] filters items.

How do I test a JSONPath expression online?

Paste your document, type the expression, and matches are evaluated as you type — no run button. Preset buttons fill in common patterns such as $, recursive descent and a filter, which is the fastest way to get the syntax right.

How do I filter an array by a field value?

Use a filter expression: $.items[?(@.price < 10)] returns cheap items, and $.users[?(@.active == true)].email returns the emails of active users. @ refers to the item currently being tested.

Is this JSONPath tester free, and is my document uploaded?

It is free with no account, and nothing is uploaded. Evaluation runs in your browser, so you can safely test expressions against a real production response.

Related Developer Tools

Last reviewed by the JSON2X Engineering Team.