JSON Path Finder

Free online JSON Path query tool. Find, filter, and extract data from JSON using JSONPath expressions. Perfect for API testing, data extraction, and JSON analysis.

clearClearpastePaste
Syntax Help

JSONPath expressions allow you to query JSON data similar to XPath for XML

Common Operators
$Root node
@Current node
.Child operator
..Recursive descent
*Wildcard (all elements)
[n]Array subscript
[start:end]Array slice
[?(...)]Filter expression

About JSON Path Finder

JSON Path Finder is a powerful tool for querying and extracting data from JSON documents using JSONPath expressions. Similar to XPath for XML, JSONPath provides a query language for JSON that makes it easy to navigate complex nested structures, filter data, and extract specific values. Perfect for developers working with APIs, data analysts exploring JSON datasets, and anyone who needs to query JSON data efficiently.

What is JSONPath?

JSONPath is a query language for JSON, similar to XPath for XML. It provides a standardized way to navigate and extract data from JSON structures.

Key features:
- Navigate nested objects and arrays
- Filter data based on conditions
- Extract specific values or entire objects
- Support for wildcards and recursive search
- Array slicing and indexing

JSONPath uses a dot-notation syntax (like $.store.book[0].title) to specify paths through JSON data. It's widely used in:
- API testing and development
- Data extraction and transformation
- Configuration file querying
- JSON data analysis
- Automated testing frameworks

What are the basic JSONPath operators?

JSONPath provides several operators for navigating JSON:

$ - Root node (start of every path)
@ - Current node (used in filters)
. - Child operator (dot notation)
.. - Recursive descent (search all levels)
* - Wildcard (all elements)
[] - Array subscript or filter

Examples:
- $.store.book - Navigate to 'book' array
- $.store.* - All children of 'store'
- $..price - All 'price' fields at any level
- $.store.book[0] - First book
- $.store.book[*] - All books
- $.store.book[0:2] - First two books (slice)
- $.store.book[?(@.price < 10)] - Books under $10 (filter)

How do filters work?

Filters use [?(...)] syntax to select elements that match a condition:

Comparison operators:
- == Equal to
- != Not equal to
- < Less than
- <= Less than or equal
- > Greater than
- >= Greater than or equal

Examples:
- $.store.book[?(@.price < 10)] - Books cheaper than $10
- $.store.book[?(@.category == 'fiction')] - Fiction books
- $.store.book[?(@.isbn)] - Books that have ISBN property
- $.store.book[?(@.author == 'Herman Melville')] - Books by specific author

Logical operators:
- && AND
- || OR

Complex example:
$.store.book[?(@.price < 10 && @.category == 'fiction')]
This finds fiction books under $10.

Can I query arrays?

Yes! JSONPath has powerful array querying capabilities:

Array indexing:
- [0] - First element (0-based indexing)
- [2] - Third element
- [-1] - Last element

Array slicing:
- [0:3] - Elements 0, 1, 2 (first three)
- [2:5] - Elements 2, 3, 4
- [:3] - First three elements
- [2:] - Elements from index 2 to end
- [-2:] - Last two elements

Multiple indices:
- [0,2,4] - Elements at index 0, 2, and 4

Wildcard:
- [*] - All array elements

Filtered selection:
- [?(@.price > 10)] - Array elements matching condition

Examples:
- $.users[0] - First user
- $.users[-1] - Last user
- $.users[0:5] - First 5 users
- $.users[*].name - All user names

How do I search for keys at any level?

Use the recursive descent operator (..) to search at all levels:

Syntax: $..<key>

Examples:
- $..author - Find all 'author' fields anywhere in JSON
- $..price - Find all 'price' fields at any depth
- $..book[*] - Find all 'book' arrays anywhere
- $..* - All values at any level

This is useful when:
- You don't know the exact path to a field
- The same field appears at multiple levels
- You want to extract all instances of a field
- Working with deeply nested JSON

Note: Recursive search can return many results and may be slower on very large JSON documents. Use more specific paths when possible for better performance.

Can I extract multiple properties?

Yes! There are several ways to extract multiple properties:

Method 1: Multiple queries
Run separate queries:
- $.store.book[*].title
- $.store.book[*].author

Method 2: Array notation
$.store.book[*]['title','author']
Extracts both title and author from all books.

Method 3: Wildcard
$.store.book[0].*
Extracts all properties of the first book.

Method 4: Parent selection
$.store.book[*]
Returns entire book objects (with all properties).

The tool displays results in JSON format, so you can see all extracted data clearly.

Tip: If you need specific properties from filtered results:
$.store.book[?(@.price < 10)]
This returns complete book objects that match the filter, including all their properties.

What are common use cases?

JSON Path Finder is useful for many scenarios:

API Development:
- Test API responses
- Extract specific fields from large JSON responses
- Verify data structure and values
- Debug API integrations

Data Analysis:
- Explore complex JSON datasets
- Find all instances of a field
- Filter data based on criteria
- Extract nested values for analysis

Data Transformation:
- Select data for ETL processes
- Map JSON fields to other formats
- Extract subsets of data
- Prepare data for database import

Testing:
- Validate JSON structure in automated tests
- Extract values for assertions
- Query test fixtures
- Verify API contract compliance

Configuration:
- Query application config files
- Extract environment-specific values
- Validate configuration structure
- Find specific settings in large configs

Is my data secure?

Yes, your data is completely secure and private:

- All processing happens in your browser (client-side)
- No JSON data is sent to any server
- No data is stored, logged, or transmitted
- Works completely offline after page load
- No cookies or tracking for your JSON data

You can verify this by:
- Checking browser network tab (no requests with your data)
- Disconnecting from internet after page loads (tool still works)
- Reviewing the open-source code

Safe to use with:
- API responses (even with sensitive data)
- Configuration files
- Customer data
- Financial records
- Personal information (PII)
- Proprietary business data

Note: Always follow your organization's data handling policies. While the tool is secure, avoid pasting highly sensitive data (like passwords, API keys, or tokens) into any online tool without proper authorization.