Shiklo Tools
PDF40
Image20
Calculators & Converters25
Text & Writing13
Developer26
Video14
Audio14
Document14
Data & Spreadsheet12
Web & SEO9
OCR & Scanning5
Archive & File12
Security & Privacy23
Health & Medical29
QR & Barcode5

JSONPath Tester

Test JSONPath queries live against your JSON: wildcards, recursive descent, slices and filters (RFC 9535), with matching values and paths.

Paste JSON, type a JSONPath query and see the matching values update as you type. Switch the output to normalized paths to see exactly where each match is, for example $['store']['book'][2]['title'], or show both. Example buttons fill in common queries, and errors in the query are explained in plain words with their position.

The evaluator follows RFC 9535, the 2024 standard for JSONPath: member names, wildcards, recursive descent with .., array indexes including negative ones, slices, unions and filter expressions with comparisons, &&, || and !, existence tests, and the functions length(), count(), match(), search() and value(). Your JSON stays in your browser.

How to use JSONPath Tester

  1. Paste or open your JSON (a sample is loaded to start).
  2. Type a JSONPath query starting with $, or click an example.
  3. Read the matches; choose Values, Paths, or both.
  4. Copy or download the result.

Features

  • RFC 9535 JSONPath, including filters and functions
  • Live results as you type
  • Values, normalized paths, or both
  • Clear error messages with the position
  • Example queries to start from
  • Runs in your browser; your JSON is not sent anywhere

JSONPath syntax

A query always starts at the root, $, and adds segments that select children. Inside a filter, @ stands for the element being tested.

SyntaxSelects
$.store.bookThe book member of store
$['store']['book']The same with bracket notation (needed for names with spaces or dots)
$.store.*Every child of store
$..priceEvery price at any depth
$.book[0] / $.book[-1]The first / last element
$.book[0,2]Elements 0 and 2
$.book[1:3] / $.book[::2]Slice: elements 1 and 2 / every second element
$.book[?@.category == 'fiction']Elements whose category is fiction
$.book[?@.isbn]Elements that have an isbn

Filters and functions

Filters compare values with == and != and the four ordering operators (less than, at most, greater than, at least), and combine conditions with && (and), || (or) and ! (not), using parentheses where needed. Strings can be in single or double quotes. Comparisons only use single values: @.price works, but @.items[*] must go into count(). The functions are length(value) for the length of a string, array or object, count(nodes) for the number of matches of a query, match(string, regex) for a whole-string regular expression match, search(string, regex) for a match anywhere, and value(nodes) to compare the single result of a query. For example $..book[?count(@.tags[*]) == 3] finds books with exactly three tags.

Differences from older JSONPath

Before RFC 9535, JSONPath was only described in a 2007 blog post by Stefan Goessner, and libraries differed in the details. The standard keeps the familiar syntax but defines it precisely. Filters no longer need parentheses, so ?@.isbn replaces ?(@.isbn), although the old form still works because parentheses are allowed. Script expressions such as (@.length-1) are gone; use [-1] for the last element. Comparing a missing member gives false rather than an error, and results come in document order. Some libraries such as Jayway JsonPath in Java add their own extensions, so a query that works there may need small changes.

Where JSONPath is used

JSONPath is used to pick values out of API responses in testing tools such as Postman and REST Assured, in Kubernetes kubectl output templates, in AWS Step Functions and many other workflow and integration tools, and in database features that query JSON columns. Testing a query here against a real response is the quickest way to get it right before putting it into code or configuration.

Tips for writing queries

Start broad and narrow down: try $..name first to see where a member appears, then switch to Paths to copy the exact location. Use bracket notation for names with spaces, dashes or dots, such as $['first-name']. Remember that a query always returns a list, even for a single match, and an empty list means nothing matched rather than an error.

Frequently asked questions

What does $..author mean?

Every member named author anywhere in the document: .. is recursive descent.

How do I filter an array?

Use [?…] with @ for the current element, e.g. $.items[?@.inStock == true && @.category == 'toys'].

How do I get the last element?

Use a negative index: $.items[-1]. A slice such as $.items[-2:] gives the last two.

Which JSONPath version does this follow?

RFC 9535, the IETF standard published in 2024, which most modern libraries follow.

What is a normalized path?

The exact location of a match written in brackets, such as $['store']['book'][0]['title']. Choose Paths to see them.

Is my JSON uploaded?

No. The query runs in your browser.

Related tools