JSONPath query tool

JSONPath Tester Online – Query and Extract JSON Data Easily

Working with deeply nested JSON shouldn’t mean manually searching through hundreds of objects and arrays.

Captain JSON’s JSONPath Query tool helps you explore JSON structures, write JSONPath expressions, and extract exactly the data you need.

Whether you’re testing API responses, debugging payloads, or building automation scripts, find the required JSON values faster.

  • 100% offline
  • Privacy first
  • Nothing uploaded

Part of the Captain JSON toolkit — 20+ JSON tools in one extension.

Example: extract every book title

Illustrative example
JSONPath expression
$.store.books[*].title
Extracted values
[  "Testing Basics",  "API Testing in Practice",  "Automation Patterns"]
Cross Browser Support

Available Across All Major Browsers

Your JSON toolkit. Wherever you develop.

Captain JSON brings essential JSON developer utilities into your everyday browser workflow. Explore JSONPath expressions, filter JSON using jq-style queries, and transform complex JSON structures into readable tables. Install Captain JSON on your preferred supported browser and make JSON exploration easier.

Available today: Google Chrome, Microsoft Edge and Mozilla Firefox. More browsers are coming soon.

What is JSONPath?

JSONPath is a query language for JSON. A JSONPath expression such as $.store.books[*].title walks a JSON document and returns the values it matches — much as XPath does for XML. Captain JSON’s JSONPath Query tool lets you run expressions, explore your JSON as an interactive tree and click any node to generate its JSONPath.

About Captain JSON: Captain JSON is a browser extension by PiratesOfBugs that provides JSON developer utilities including JSON comparison, formatting, pretty printing and validation.

Features

JSONPath tester features

Run expressions, explore the structure and generate paths — all in your browser.

  • Execute JSONPath expressions

    Run an expression against your JSON and see what it matches.

  • Interactive JSON tree explorer

    Browse objects and arrays as an expandable tree.

  • Click any node to generate its JSONPath

    Select a node in the tree and get the expression that points to it.

  • Auto execute mode

    Run queries automatically instead of triggering each one by hand.

  • Display matching JSON values

    See the values your expression matches.

  • Show query results clearly

    Read extracted results in a clear, structured output.

  • Search nodes by key or value

    Find a node in a large document by its key or its value.

  • Expand / collapse all nodes

    Open or fold the whole tree in one action.

  • Query history & built-in examples

    Revisit earlier queries and start from ready-made examples.

  • Copy or download extracted data

    Copy the extracted data or download it.

Problem & solution

Stop Manually Searching Through Nested JSON.

The problem

Modern APIs frequently return deeply nested JSON structures containing objects, arrays, and multiple levels of data.

Finding a specific property manually becomes difficult when working with large API responses.

How Captain JSON helps

JSONPath provides a query language for navigating JSON structures and extracting specific values.

Captain JSON makes this process easier through an interactive JSONPath editor and tree explorer.

  • Interactive JSON tree explorer
  • Click any node to generate its JSONPath
  • Runs locally — your JSON never leaves the browser
Use cases

Where Can You Use JSONPath?

  • API Testing

    Extract specific values from REST API responses.

  • Data Extraction

    Retrieve nested properties without manually navigating JSON.

  • Automation Scripting

    Extract dynamic values for automated test execution.

  • Learning JSONPath

    Understand expressions through interactive JSON exploration.

  • Debugging Nested JSON

    Investigate complex API payloads and nested objects.

How to use

How to Query JSON Using JSONPath

  1. Step 1

    Open Captain JSON

  2. Step 2

    Navigate to JSONPath Query

  3. Step 3

    Load or paste your JSON document

  4. Step 4

    Enter your JSONPath expression

  5. Step 5

    Execute the query

  6. Step 6

    Review the extracted values

  7. Step 7

    Click nodes in the JSON tree to generate their JSONPath expressions

Examples

JSONPath example: JSON, expression and output

These illustrative examples run four common expressions against one document. They are examples, not screenshots of the extension.

JSON document
{  "store": {    "name": "Bug Bounty Books",    "books": [      { "title": "Testing Basics", "author": "A. Rivera", "price": 8.99, "inStock": true },      { "title": "API Testing in Practice", "author": "M. Chen", "price": 24.5, "inStock": true },      { "title": "Automation Patterns", "author": "S. Okafor", "price": 31, "inStock": false }    ]  }}

Extract every title

Illustrative example

[*] matches every item in the books array; .title reads one property from each.

JSONPath expression
$.store.books[*].title
Extracted values
[  "Testing Basics",  "API Testing in Practice",  "Automation Patterns"]

Filter by a condition

Illustrative example

A filter expression keeps only the books priced under 25.

JSONPath expression
$.store.books[?(@.price < 25)].title
Extracted values
[  "Testing Basics",  "API Testing in Practice"]

Find a value at any depth

Illustrative example

Recursive descent (..) finds every price, wherever it sits in the document.

JSONPath expression
$..price
Extracted values
[  8.99,  24.5,  31]

Pick one item

Illustrative example

An array index selects a single book. The matches are still returned as a list.

JSONPath expression
$.store.books[0].author
Extracted values
[  "A. Rivera"]
FAQ

JSONPath: frequently asked questions

What is JSONPath?

JSONPath is a query language for JSON. A JSONPath expression describes where values live in a document and returns the values it matches — for example $.store.books[*].title returns every book title. It plays the same role for JSON that XPath plays for XML. Captain JSON’s JSONPath Query tool runs expressions against your JSON in your browser.

How do I query JSON online?

Paste or load your JSON into Captain JSON, open JSONPath Query, enter an expression and execute it — or use auto execute mode to run queries automatically. The matching values appear in the results. Everything runs in your browser, so your JSON is never uploaded.

How can I extract nested values from JSON?

Write a path that follows the structure — $.store.books[0].author returns one nested value — or use recursive descent to find a key at any depth, such as $..price. In Captain JSON you can also click a node in the interactive tree to generate its JSONPath instead of writing it by hand.

What is a JSONPath expression?

A JSONPath expression is a string that describes a route through a JSON document. $ is the root, dots and square brackets step into properties and indexes, [*] matches every item in an array, and [?(@.price < 25)] keeps only the items that satisfy a condition. The result is the list of values the expression matches. Implementations differ slightly on advanced features, so test non-trivial expressions on your own data.

How do I test JSONPath expressions?

Load a representative sample of your JSON, run the expression and check that the extracted values are the ones you expect. In Captain JSON the interactive tree shows the structure and generates paths from clicked nodes, built-in examples and query history give you starting points, and auto execute mode runs the query automatically.

What is the difference between JSONPath and jq?

JSONPath selects the values found at matching locations and returns them. jq is a fuller filter language that can also reshape objects, sort, group and compute values. A common approach is to locate data with JSONPath and transform it with jq. Captain JSON includes both — see the jq Query tool.

Can JSONPath query arrays and nested objects?

Yes. Use an index such as [0] for one item, [*] for every item and [?(...)] to filter items, and step through nested objects with dots. For example, $.store.books[?(@.price < 25)].title filters an array inside a nested object and returns only the titles.

Is Captain JSON useful for API testing?

Yes. Paste an API response, find the value you need and copy its JSONPath for your tests or automation scripts. Captain JSON isn’t a test runner — it helps you write and verify the expressions your tests will use. You can also check a response with the JSON validator or compare two responses with JSON Compare.

One Toolkit. More Control Over Your JSON.

From exploring nested JSON to filtering complex data and converting structures into readable tables, Captain JSON brings essential JSON utilities together in one browser extension.

  • ✓ 100% Offline
  • ✓ Privacy First
  • ✓ Lightweight

We use analytics cookies to understand how the site is used. No personal data is sold. See our privacy practices before choosing.