JSON

JSONPath Tester

Run JSONPath queries against JSON and see every match with its path and JSON pointer.

JSON document

0 characters · 0 lines

Expressions must start with $. Results update automatically while you type; Ctrl+Enter re-runs the expression.

JSONPath results

Paste JSON and enter a JSONPath expression

Matches, their JSONPath addresses, and RFC 6901 pointers appear here as soon as both a document and an expression are present.

Try an example

Supported selectors

  • root $
  • child: $.store.bicycle and $['store']['bicycle']
  • quoted names: $['key.with.dots'], $["key with spaces"]
  • array index: $.users[0]
  • wildcard: $.users[*].name and $.store.book.*.title
  • recursive descent: $..price and $..*
  • slice: $.users[0:2], $.users[1:]
  • union: $.users[0,1] and $['plain','nested']
  • filter: [?(@.price > 10)], [?(@.name == 'Ada')], [?(@.active && @.age > 30)]
  • filter regex: [?(@.name.match(/^A/))]
  • result paths and JSON pointers alongside the values

Not supported

  • Negative indexes such as [-1] are not supported — RFC 9535 allows -1 only as a slice bound, and this engine would return no matches.
  • A negative slice step such as [::-1] is not supported.
  • The `in` operator inside a filter is not supported.
  • Script expressions such as $[(…)] and function-valued @property are not evaluated.
  • This tester evaluates the jsonpath-plus dialect, not RFC 9535 in full.
Waiting for a JSON document and a JSONPath expression.

Your data stays private

This tool runs directly in your browser. The content you enter is processed locally and is not sent to TechFixGen servers. No account or signup is required.

JSONPath Tester, explained

What is JSONPath?

JSONPath is a query language for JSON. Much like XPath for XML, it lets you extract values from nested objects and arrays by writing a short expression, such as $.store.book[?(@.price > 10)].title. This tool evaluates expressions in your browser against the JSON you provide.

Every evaluation runs locally. Results include the extracted values, the normalized JSONPath for each match, and the corresponding RFC 6901 JSON pointer. The engine used is jsonpath-plus in safe mode, which executes filters without new Functionand never reaches network resources.

How to use the JSONPath Tester

  1. Paste JSON into the "JSON document" editor.
  2. Enter a JSONPath expression (it must start with $).
  3. Results update live while you type. A status badge shows how many matches, or whether the expression is invalid or returns nothing.
  4. Expand any object or array match to inspect its full value.
  5. Copy the matched values as JSON with the "Copy values" button.

Supported syntax

The tester supports the everyday JSONPath selectors. It rejects a small set of unsafe or ambiguous forms before the engine runs, so syntax mistakes are caught early instead of returning unexpected results.

Supported

  • root $
  • dot/bracket child access
  • quoted property names
  • array indexes
  • wildcards (*)
  • recursive descent (..)
  • slices [start:end]
  • unions ([a,b] or [0,1])
  • filters [?(…)] with comparisons, &&, ||, !
  • regex inside filters (match, test)
  • paths and RFC 6901 JSON pointers

Not supported

  • negative array indexes
  • negative slice steps
  • the in filter operator
  • script expressions ($[(...)])

Examples

The sample document is built into the tool. Each example below queries that data, so you can click "Load sample" to try them immediately.

  • Filter by a condition

    $.store.book[?(@.price > 10)].title

    Comparisons, &&, || and ! work inside the parentheses.

  • Every price at any depth

    $..price

    Recursive descent collects matches from the whole document.

  • Names of all users

    $.users[*].name

    [*] walks every item of an array.

  • A slice of users

    $.users[0:2].name

    Slices are [start:end]; the end is exclusive.

  • Keys that need quoting

    $['key.with.dots']

    Dots and spaces in a property name must be written inside quotes.

  • A filter with a regex

    $.users[?(@.name.match(/^A/))].age

    match(/…/) works on string values inside a filter.

Privacy

JSONPath evaluation runs entirely in your browser. The JSON you paste and the expressions you test are not uploaded to TechFixGen servers and are not included in analytics events — no account or signup is required.

Frequently asked questions

Do I need to add the $ before my JSONPath expression?

Yes. Every expression must start with the $ root token, for example $.store.book[0].title. Omitting it is reported as an invalid expression so the mistake is caught before the engine runs.

What is the difference between $.. and $?

$ selects the whole document, the root value. $.. is a recursive descent: it finds matching values at any depth. For example $..price returns every price in the document, wherever it appears.

How do I filter an array in a JSONPath expression?

Use a filter selector such as [?(…)] followed by the field you want. For example $.store.book[?(@.price > 10)].title returns the titles of books priced above 10. Comparisons, &&, ||, and ! all work inside the parentheses.

What do the path and pointer fields mean?

Each match shows two addresses. The path is the normalized JSONPath, such as $['store']['book'][1]['title']. The pointer is the RFC 6901 JSON pointer, such as /store/book/1/title, which is the form most JSON Pointer tools expect.

Why does my expression report no matches instead of an error?

No matches means the expression is valid but nothing in the document matched it, which is different from an error. Check the property names and array indexes, or widen the expression with a wildcard or a recursive descent.

Does the JSONPath Tester upload my JSON?

No. Evaluation runs entirely in your browser. Your JSON and your expressions are not uploaded to TechFixGen servers and are not included in analytics events.

Is it safe to run expressions from untrusted sources?

Yes. Filters are evaluated by jsonpath-plus in safe mode, which interprets the filter expression rather than compiling it into JavaScript. It does not use new Function, does not touch globalThis, and cannot reach the network.