HTML Tools

Free JSONPath Tester

Build and test JSONPath expressions against any JSON document. Supports the full JSONPath syntax including dot notation ($.store.book[0].title), bracket notation ($['store']['book'][0]['title']), wildcards (*, $..*), array slices, and filter expressions (?(@.price < 10)). Results display each matched value with its full path for easy verification.

Loading tool...

What is JSONPath Tester?

JSONPath Tester is an interactive tool for building and testing JSONPath queries against JSON data. JSONPath is a query language for JSON, similar to XPath for XML. It lets you extract specific values, filter arrays, navigate nested structures, and traverse all nodes. The tool shows matched results with their paths and highlights matching nodes for visual feedback.

quickAnswer

Paste JSON data, type a JSONPath expression, and see matched results with their paths. Supports dot/bracket notation, wildcards, array slices, and filter expressions. Results update live as you type the query.

limitations

  • JSONPath filter expressions support basic comparisons (<, >, <=, >=, ==, !=) and the @ current-node reference. Complex boolean logic (nested &&/||) and regex filters are not supported in the standard JSONPath syntax.
  • The tool evaluates JSONPath expressions as defined by Stefan Goessner's original specification. Some extended JSONPath implementations (like JSONPath Plus or Jayway) support additional operators that are not available here.
  • Recursive descent queries ($..*) on very large JSON documents can produce thousands of results and may cause slow rendering. Use more specific paths when working with large datasets.

How to use this tool

  1. Paste JSON data into the input area. The tool validates the JSON before allowing queries.
  2. Type a JSONPath expression in the query field. The results update automatically as you type.
  3. Browse matched results showing each value with its JSONPath path and data type.
  4. Click a result to highlight the matching node in the JSON tree view for visual confirmation.

What you can use it for

  • Test and debug JSONPath expressions before using them in API integration tools, workflows, or data pipelines.
  • Explore unfamiliar JSON structures by using wildcard and recursive descent queries to discover all available fields.
  • Validate filter expressions for conditional data extraction -- confirm the right items match before implementing in code.

Use cases

Practical examples

example

Extracting all book titles from a bookstore API

A developer needs all book titles from a bookstore JSON response. They paste the JSON, enter $.store.book[*].title, and see all titles listed with their paths. The expression works correctly, so they use it in their JavaScript code with a JSONPath library.

example

Finding books under a price threshold

A data analyst wants books priced under $15 from a product catalog. They enter $.store.book[?(@.price < 15)] and see only matching books. They adjust the threshold to 10 and confirm the filter expression syntax before coding it into their pipeline.

Common mistakes

  • Forgetting that JSONPath array indices are 0-based -- $.store.book[1] returns the second book, not the first. New users often use 1-indexing by mistake.
  • Using single quotes inside bracket notation without escaping -- $['book with 'quote'] fails. Use double quotes in bracket notation or escape single quotes properly.
  • Assuming JSONPath filter expressions work the same as JavaScript array.filter() -- JSONPath supports a limited subset of comparison operators. Complex boolean logic with && and || may not work in all JSONPath implementations.

verification

  1. Paste the sample JSON { "store": { "book": [{ "title": "A", "price": 10 }, { "title": "B", "price": 20 }] } }. Enter $.store.book[*].title and confirm both titles appear in the results with their full paths.
  2. Enter $.store.book[?(@.price < 15)].title and confirm only the first book (price 10) matches. Verify the result path shows $.store.book[0].title.

FAQ

Questions about JSONPath Tester

What is the difference between dot notation and bracket notation in JSONPath?

Dot notation ($.store.book.title) is shorter and readable for simple field names. Bracket notation ($['store']['book']['title']) handles field names with special characters, spaces, or dashes. Bracket notation also supports computed property names and numeric indices like $['books'][0]. Both are valid and can be mixed.

Does the tool support the @ character in filter expressions?

Yes. @ refers to the current node in filter expressions. For example, $.store.book[?(@.price < 10)] checks each book's price. @.property accesses the current node's property. @ itself refers to the entire current node for use with functions like @.length or comparison against primitives.

How does the recursive descent operator $.. work?

$.. searches all descendants recursively regardless of depth. For example, $..title finds all title fields at any nesting level. $..* retrieves every value in the document. This is useful for exploring deeply nested JSON structures but can produce many results on large documents.

Related tools

More html tools

Html

ARIA Live Region Generator

Generate accessible ARIA live region HTML snippets with role, aria-live, aria-atomic, and aria-relevant attributes. Includes optional JavaScript update function.

Open tool

Html

CSP Hash Generator

Generate CSP hash values for inline scripts and styles. Hash exact code content with SHA-256, SHA-384, or SHA-512 and get the matching CSP directive snippet.

Open tool

Also try

Also try

Seo

AI Crawler robots.txt Builder

Build a robots.txt policy for AI crawlers. Choose from open, selective, or strict presets and block specific AI training bots while allowing search engines.

Open tool