# JSONPath tester

> Query JSON with JSONPath Plus and inspect every match.

Free JSONPath tester. Paste a JSON document, write a JSONPath Plus query, and see each match with its path and a count. Syntax mistakes are reported with the position, and filters, slices, unions, and recursive descent all work.

- Page: https://benchline.fabwaseem.com/t/jsonpath-tester
- Runs: in the browser. Input stays on the device.
- Price: free, no account
- Input: A JSON document and a JSONPath Plus query.
- Output: Matching values with their normalized paths, the total count, and syntax errors with positions.
- Keywords: jsonpath tester, jsonpath online, json query, jsonpath plus, test jsonpath expression
- Updated: 2026-10-18
- Built by: Waseem Anjum (https://fabwaseem.com)

## How to use it

1. **Paste your JSON.** Drop a JSON document into the left pane. Invalid JSON is flagged immediately.
2. **Write the query.** Start with $ and use dot or bracket notation. Try $.store.book[*].author or a filter like $.store.book[?(@.price < 10)].
3. **Read the matches.** Each match shows its value and its full path. Large result sets are truncated at 500 with the total count kept.

## Use it from an AI agent

MCP tool name: `query_jsonpath`
MCP endpoint: https://benchline.fabwaseem.com/mcp (Streamable HTTP, no key)
HTTP: POST https://benchline.fabwaseem.com/api/v1/tools/jsonpath-tester with the input as the JSON body
This call does not fetch anything. It runs on the arguments you send.

Evaluate a JSONPath Plus query against a JSON document and return the matches with their paths. A number that does not fit in a JavaScript number is returned as its original digits, with a precision warning.

### Input schema

```json
{
  "type": "object",
  "properties": {
    "json": {
      "type": "string",
      "minLength": 1,
      "description": "JSON document text"
    },
    "query": {
      "type": "string",
      "minLength": 1,
      "description": "JSONPath query, e.g. $.store.book[*].author"
    },
    "limit": {
      "default": 50,
      "description": "Maximum matches to return",
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    }
  },
  "required": [
    "json",
    "query",
    "limit"
  ],
  "additionalProperties": false
}
```

### Example tools/call

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "query_jsonpath",
    "arguments": {
      "json": "{}",
      "query": "example",
      "limit": 50
    }
  }
}
```

Setup for Claude, Cursor, and VS Code: https://benchline.fabwaseem.com/mcp/guide

## Questions

### Which JSONPath dialect is this?

JSONPath Plus, the most widely used JavaScript implementation. It supports filters like [?(@.price < 10)], slices like [0:2], unions, recursive descent with .., and script expressions.

### Why does my query return nothing?

Check the root: queries start with $. Property names are case sensitive, and array indexes start at 0. The syntax check flags unbalanced brackets and quotes.

### Is my JSON sent anywhere?

No. Evaluation runs in the browser with the document you pasted.

### What does the path column show?

The normalized path of each match, like $['store']['book'][0]['author'], so you can see exactly where a value came from.

### What if a number is too large?

A number that does not fit in a JavaScript number is shown with its original digits, as text, and a precision warning names it. Filters still run on the numbers JavaScript can store.

## Related tools

- [JSON formatter](https://benchline.fabwaseem.com/t/json-formatter): Pretty-print, minify, and validate JSON, with the exact line and column when it fails.
- [JSON YAML converter](https://benchline.fabwaseem.com/t/json-yaml-convert): Convert JSON, YAML, TOML, and XML in the browser, and keep the line number when a document fails.
- [JSON Schema](https://benchline.fabwaseem.com/t/json-schema-validate): Infer a schema from JSON, validate against one, and export TypeScript and Zod.
