JSON Input

Query Results

Examples:

What is JSON Path Query?

Need to extract specific data from huge JSON files? JSON Path lets you query and extract values from complex JSON (JavaScript Object Notation) structures. Think of it like XPath for XML, but for JSON.

JSONPath is to JSON what XPath is to XML: a short expression that points at the values you want. This tool supports the classic JSONPath syntax through the jsonpath-plus library, so you can pick fields, filter arrays and walk nested structures. Results come back as a JSON array, and big integers like 19-digit IDs keep every digit. Great for pulling a handful of values out of a big API response.

Everything happens in your browser, so your JSON never leaves your computer. The results update as you edit the expression or the JSON.

How to Use JSON Path Query

Follow these steps to extract data from JSON using JSONPath. Each step uses the actual inputs and panels on this page.

1

Paste JSON or Load Sample

Paste your JSON into the left JSON Input panel, or click Upload to load a file. Click Sample to load example data (e.g. a store with books). The sample includes nested structures for testing paths. Supports standard JSONPath syntax.

2

Enter JSONPath Expression

Type your expression in the JSONPath Expression field below the editors. Examples: $..* (all values), $.store.book[*].author (all authors), $..price (all prices). Use the example buttons – All values, All authors, All prices, Books under $10 – to try common patterns. Results update automatically as you type.

3

View and Export Results

The right Query Results panel shows matching values. Click Copy to copy results, or Download to save as a file. All processing runs in your browser – your JSON never leaves your computer.

When You'd Actually Use This

Data Extraction

Extract specific values from large JSON documents. Find all prices, names, or IDs without manually navigating the structure.

Filtering Arrays

Use filter expressions to find items matching conditions. Find all products under a certain price, or users in a specific city.

API Testing

Test API responses by extracting specific fields. Verify that expected values exist and match your requirements.

Data Analysis

Extract data for analysis or reporting. Pull specific fields from JSON exports to use in spreadsheets or other tools.

Common Questions

Is my JSON data stored?

Nope. Everything happens right in your browser. Your JSON never leaves your computer.

What JSONPath syntax is supported?

We support standard JSONPath syntax including: $ (root), . (child operator), .. (recursive descent), [*] (wildcard), [0] (array index), and [?(@.key)] (filter expressions). JSONPath only got a formal standard in 2024, as RFC 9535. This page follows the older Goessner-style syntax that jsonpath-plus implements, so a filter copied from an RFC 9535 engine may need small changes before it works here.

How do filter expressions work?

Filter expressions use [?(@.property operator value)] syntax. For example, $..book[?(@.price < 10)] finds all books with price less than 10.

Can I query nested objects?

Yep. Use the recursive descent operator .. to search through all levels. For example, $..price finds all price values no matter how deep they're nested.

What if the JSONPath doesn't match anything?

You get an empty array, []. Check the path against the actual key names (they're case-sensitive) and whether a level is an array that needs [*] or an index.

Does it work with invalid JSON?

No, you'll need valid JSON first. If something's broken, you'll see an error. The JSON Validator points at the problem, and the JSON Fixer can repair common mistakes.

Other JSON Tools You Might Need

Querying is just one JSON task. Here are other tools that work well together: