Skip to content
ToolPlankDEV
JSON Tools
100% In-Browser Execution

Updated:

JSONPath Tester

Type a query and this jsonpath tester evaluates it on your JSON as you type. Every match shows its normalized path and value, errors point to the exact column, and filters, slices, unions and the five RFC 9535 functions all work. Nothing is uploaded.

Processing in browser...

Loading the tool. It runs entirely in your browser, so your data is never uploaded.

More free tools you may need next.

Quick Guide

How to use JSONPath Tester

Simple step-by-step instructions to get the exact output you need.

  1. 01

    Add your JSON

    Paste a JSON document into the left box, drop a .json file on it, or press Open file. Example loads a small plant shop, and RFC 9535 bookstore loads the sample document from the standard.

  2. 02

    Type a JSONPath query

    Write a query that starts with $, or press one of the query chips. The results update as you type. If the query has a mistake, the message names the column and a caret points at it.

  3. 03

    Read the matches

    Each match shows its normalized path, its type and a preview of its value. Press Show in JSON to select that value in the document, or open Breakdown to read what every step of the query does.

  4. 04

    Copy or download the result

    Copy JSON copies the matched values as an array and Copy paths copies one normalized path per line. On the Output tab you can switch to path and value pairs or JSON Pointers, minify the JSON and download it as a file.

What a JSONPath tester does

JSONPath is a short query language for picking values out of a JSON document, much like XPath does for XML. A jsonpath tester lets you try a query on real data and see exactly which values it selects before you put that query into code, a config file or a monitoring rule.

This tool follows RFC 9535, the IETF standard for JSONPath published in 2024. It reads the query, checks it against the grammar, and evaluates it on your document in the browser. Every match is listed with its normalized path, so you can see where each value came from and not only what it is.

A worked example

Press Example to load a plant shop with five products. This query keeps products that cost less than 25 and need low light, then takes their names:

Text
$.shop.products[?@.price < 25 && @.light == 'low'].name

The tester returns two matches:

JSON
[
  "Snake Plant",
  "ZZ Plant"
]

Switch the output to normalized paths and a query such as $.shop.products[?@.stock == 0].sku returns $['shop']['products'][1]['sku'] . Normalized paths are the standard way to name one exact node, which helps when you log a result or compare two runs.

JSONPath syntax supported by this evaluator

  • $ is the root of the document and @ is the current item inside a filter.
  • .name or ['name'] selects a member. Use brackets for names with spaces, dots or quotes.
  • * selects every member of an object or every item of an array.
  • .. searches the current node and everything nested inside it, for example $..price.
  • [0] selects an index and [-1] counts from the end.
  • [start:end:step] is a slice, so [::2] takes every second item and [::-1] reverses the array.
  • [0,2] or ['lat','lng'] is a union of several selectors.
  • [?@.price < 10] is a filter. Filters support ==, !=, <, <=, >, >=, &&, || and ! with parentheses.

A filter that names a path without a comparison tests whether it exists. Existence is not the same as truthiness: $.shop.products[?@.discount].name returns Monstera Deliciosa and ZZ Plant, because ZZ Plant has a discount key whose value is null.

Filter functions: length, count, match, search and value

  • length(@.tags) gives the length of a string in characters, of an array in items, or of an object in keys.
  • count(@.tags[?@ == 'easy']) counts the nodes a path selects.
  • match(@.sku, '[A-Z]{3}-0[1-3]') is true when the whole string matches the pattern.
  • search(@.name, 'Plant') is true when the pattern appears anywhere in the string.
  • value(@..color) turns a path that selects exactly one node into its value.

The evaluator checks function types the way the standard does. length(), count() and value() return a value, so they must be compared. match() and search() return true or false, so they stand on their own and cannot be compared with == true.

Strict RFC 9535 mode and older JSONPath forms

Many queries online were written for the original 2007 JSONPath article or for the Jayway Java library. With Strict RFC 9535 off, the tester accepts a few of these forms when their meaning is clear, and it adds a note that shows how each one was read:

  • A query without the leading $, such as store.book, gets $ added in front.
  • [(@.length-1)] is read as the index -1.
  • @.author =~ /.*tolkien/i is read as a full match with a JavaScript regular expression.
  • Dot names with a dash, such as $.first-name, are read as $['first-name'] .
  • Spaces around the whole query are ignored.

Turn Strict RFC 9535 on to check that a query will work in any compliant library. Jayway path functions such as .length() and operators such as in are not accepted in either mode. The error message suggests the standard way to write them.

Errors with an exact column

When a query cannot be read, the tester shows the column and a caret under the problem, and it says how to fix it. For example, $.shop.products[?@.price < ] gives:

Text
Column 28: "]" cannot start a value. Use @ for the current item, $ for the root, a number, 'text', true, false, null or a function.

A common mistake is comparing a path that can select many nodes. @.tags[*] == 'easy' is rejected because a comparison needs at most one value. Use count(@.tags[?@ == 'easy']) > 0 instead. Errors in the JSON document are reported with their line and column too, and Go to error selects the spot.

Output formats and options

  • Values: a JSON array of the matched values, pretty printed or minified.
  • Normalized paths: one path per line, such as $['shop']['products'][1] .
  • Path and value pairs: a JSON array of objects with a path and a value.
  • JSON Pointers: one RFC 6901 pointer per line, such as /shop/products/1/name.
  • Unique matches removes nodes that a union or a .. search selected more than once. The standard keeps duplicates, so this is off by default.
  • Allow comments in JSON ignores // and /* */ comments and trailing commas in the document.

Limits and privacy

The tester handles documents up to 2,000,000 characters. The list shows the first 500 matches, and copy and download include all of them up to 20 million characters. A query stops after 5,000,000 steps, or after 5 seconds, so a deep .. inside another .. cannot freeze the page. Numbers with more than 15 significant digits may lose their last digits, and the tool warns when it finds them. Object members are listed in the order the browser keeps them, which puts keys that look like whole numbers first.

The query runs in a background worker in your browser. Your JSON is not uploaded, as the Privacy Policy explains. To check data against a schema, use the JSON Schema Validator. To turn nested JSON into flat key paths, try JSON Flatten, and for files with one record per line, open the JSONL Viewer. Sort JSON Keys puts members in a stable order before you compare results.

Frequently Asked Questions

Technical Q&A for JSONPath Tester

Common questions about edge cases, character encoding, and privacy guarantees.

Paste your JSON, type the expression and read the matches. The results update as you type, and each match shows its path and value.

It follows RFC 9535, published by the IETF in 2024. With strict mode off it also accepts a few older forms from the original JSONPath article and from Jayway, and it notes each one.

Put a question mark inside brackets and use @ for the current item, for example $.items[?@.price < 10]. Join conditions with && and ||, and use ! to negate.

match() is true only when the whole string fits the pattern. search() is true when the pattern appears anywhere in the string.

A filter like [?@.discount] tests whether the key exists, not whether it is truthy. Compare the value instead, for example [?@.discount != null].

It is the standard way to name one node, using bracket notation with single quotes, such as $['store']['book'][0]. Each match lists its normalized path.

Yes. [-1] is the last item, [1:3] takes items 1 and 2, and [::-1] reverses an array.

Yes. Choose JSON Pointers on the Output tab, or press Copy pointer on a single match.

No. The query runs in your browser and the document is never uploaded.