TFT

JSONPath Query Tool – Run JSONPath Online

Execute JSONPath expressions against JSON data and view matching results instantly. Our free JSONPath Query Tool is perfect for testing queries before integrating them in code.

About JSONPath Query Tool

Extracting specific data from large JSON documents manually is tedious. JSONPath provides a concise syntax for navigating JSON structures, similar to XPath for XML. This tool lets you test queries instantly.

How it works

Enter your JSON and a JSONPath expression starting with $ for root. Use dot notation for properties, brackets for array indices, and [*] for all array elements.

The tool evaluates your expression and returns all matching values. Results are shown as an array, even for single matches, making it easy to see what your query selects.

When you'd use this

You're working with a large API response and need to extract just the user emails from nested data. A JSONPath like $.data.users[*].email gets exactly what you need.

This implements basic JSONPath features. Advanced features like filter expressions [?(@.age>18)] or recursive descent may not work. Use a full JSONPath library for complex queries.

Questions

What does $ mean in JSONPath?

$ represents the root of your JSON document. All paths start from here, like $.users for the users property at root level.

How do I access array elements?

Use brackets with the index: $[0] for first element. Use [*] to select all elements: $.items[*] gets all array items.

Can I query nested properties?

Yes, chain property names with dots: $.user.address.city navigates through nested objects to get the city value.

What do the Quick Query buttons do?

They insert common JSONPath patterns to help you learn. Click one to see the expression, then modify it for your needs.

Can I download query results?

Yes. Use Download to save results as JSON or Copy to paste into your code. Results are always valid JSON arrays.