JSON Path Extractor
Connecting webhooks between marketing platforms, payment gateways, and CRMs often hinges on extracting the exact value buried five levels deep in a JSON response. This free, client-side JSON Path Extractor evaluates JSONPath expressions against any payload in real time, diagnoses matching nodes, and automatically translates queries into ready-to-use syntax for Zapier, Make, n8n, and jq. Everything executes securely inside your browser—no payload data or customer records are ever sent to a server.
Free client-side tool · zero server transmission
Query & extract data with JSONPath
Evaluate JSONPath queries against webhook payloads or API responses in real time. Inspect matching nodes and generate ready-to-use syntax for Zapier, Make, n8n, and jq.
- 100% In-Browser & Private
- Real-Time Evaluation
- Slices, Filters & Wildcards
- Zapier, Make, n8n & jq Syntax
1Input JSON Payload
ReadySelect a production sample to test extraction immediately or paste your custom JSON below.
Paste valid JSON object or array. Syntax errors are caught and highlighted automatically.
2JSONPath Query & Platform Target
Supports dot/bracket access ($.a.b), wildcards ([*]), recursive descent ($..email), and slices ([0:2]).
$.data.object.customer.email
3Extracted Output & Diagnostics
Found 1 matching node in the payload.
"[email protected]"
What is JSONPath and How Does It Work in Automation?
Modern marketing automation platforms, customer relationship managers (CRMs), and webhook event brokers communicate through JavaScript Object Notation (JSON). When an e-commerce platform like Shopify registers a completed order, or a payment gateway like Stripe confirms a payment intent, they broadcast a structured JSON webhook containing customer metadata, financial breakdowns, billing addresses, and line-item arrays. Extracting a specific value—such as a purchaser's email address or an itemized discount code—requires traversing that hierarchical data structure accurately.
JSONPath was introduced by Stefan Goessner in 2007 and formalized as an Internet Engineering Task Force standard under RFC 9535 in 2024. Designed as the JSON counterpart to XML's XPath, JSONPath provides a declarative query language to navigate, filter, and extract specific fragments from structured JSON documents without writing procedural loops or custom parsing scripts.
In automation tools such as Zapier, Make (formerly Integromat), and n8n, as well as command-line utilities like jq, JSONPath expressions serve as the universal targeting syntax. When you map an incoming lead payload into your CRM, the integration engine uses JSONPath behind the scenes to extract $.data.customer.email or filter line items matching specific price thresholds.
JSONPath Syntax Reference & Operator Guide
JSONPath uses a compact notation combining root symbols, child selectors, bracket notation, wildcards, and filter expressions. The table below outlines the core operators supported across modern automation platforms and this extraction engine:
| Operator | Name | Description & Example |
|---|---|---|
$ |
Root Object/Array | Represents the outermost container. Every absolute JSONPath expression begins with $. |
.key |
Dot Child Selector | Accesses a named child property of an object. Example: $.customer.email. |
['key'] |
Bracket Child Selector | Accesses child properties with hyphens, spaces, or special characters. Example: $['billing-address']['zip_code']. |
.* or [*] |
Wildcard Selector | Matches all properties in an object or all elements in an array. Example: $.line_items[*].title. |
..key |
Recursive Descent | Recursively searches the entire JSON tree for a property name at any depth. Example: $..email collects all emails across all nested objects. |
[n] |
Array Index | Extracts the element at zero-based index n. Supports negative indexing from the end, such as [-1] for the final element. |
[start:end:step] |
Array Slice | Extracts a subarray slice. Example: $.items[0:2] extracts the first two elements; $.items[-2:] grabs the last two. |
[a, b] |
Union Selector | Extracts multiple specific indices or object properties. Example: $.items[0, 2] or $.user['firstname', 'lastname']. |
[?(@.key op val)] |
Filter Expression | Filters array elements meeting a logical comparison. Example: $.charges[?(@.paid == true)] or $.items[?(@.price > 50)]. |
Step-by-Step: Extracting Webhook Data for Zapier, Make & n8n
When bridging inbound webhooks to downstream workflow steps, each automation platform implements a slightly different convention for referencing nested keys. Following this structured workflow eliminates payload parsing errors:
- Capture and Inspect the Raw Webhook: In your webhook receiver (such as a Zapier Catch Hook trigger or an n8n Webhook node), copy the complete raw JSON body received from your source app (e.g., Stripe, Shopify, HubSpot).
- Paste and Validate in the Extractor: Paste the JSON payload into the input panel above. The built-in validator verifies whether the document conforms to RFC 8259 JSON specifications, reporting exact line and column issues if trailing commas or unescaped quotes break syntax.
- Pinpoint the Target Property: Check the "Detected Payload Paths" list to view the hierarchy discovered by the parser. If extracting an address, enter
$.shipping_address.cityor search recursively with$..city. - Switch Platform Syntax Target: Select your target automation software from the syntax dropdown:
- Zapier & Make: Outputs double-curly syntax (e.g.,
{{data.object.customer.email}}) used in step data mapping. - n8n: Outputs expression syntax (e.g.,
{{ $json.data.object.customer.email }}) ready for JavaScript nodes and Code node field mappers. - jq: Outputs standard command-line stream processor syntax (e.g.,
.data.object.customer.email) for terminal scripts and curl payloads.
- Zapier & Make: Outputs double-curly syntax (e.g.,
- Copy and Deploy: Click "Copy Path" or "Copy Result" to paste the verified expression directly into your workflow trigger or action mapping.
Handling Complex Edge Cases: Arrays, Filters & Recursive Descent
While extracting flat properties like $.id is straightforward, production webhooks frequently contain complex nested arrays and conditional structures. Three patterns solve the most common integration challenges:
1. Extracting All Values from an Array of Objects
When an e-commerce order contains multiple purchased products, accessing $.line_items[0].title returns only the first item. To extract every product title across the entire purchase as a list, use the array wildcard: $.line_items[*].title. The engine collects every matching title into a uniform array, allowing you to pass the complete catalog list into an email notification or billing receipt.
2. Filtering Elements by Attribute
In multi-charge transactions or subscription updates, you often need to target only the successful charge. By writing $.charges.data[?(@.paid == true)], the JSONPath engine filters the array, discarding failed attempts and returning only the transaction record where payment succeeded. You can similarly filter by numerical thresholds, such as $.items[?(@.price >= 100)] for high-value orders requiring expedited fulfillment.
3. Locating Deeply Buried Keys with Recursive Descent
Enterprise webhook payloads from payment providers and marketing CRMs can span hundreds of lines with nested charge objects, dispute histories, and metadata dictionaries. If you know the payload contains an email address but are unsure whether it resides under $.customer.email, $.data.object.billing_details.email, or $.data.receipt_email, query $..email. The recursive descent operator scans all nesting depths and returns an array containing every matched occurrence found throughout the tree.
Client-Side Security & Privacy for Production Payloads
Webhook payloads from live business applications inherently contain sensitive Personally Identifiable Information (PII), including customer names, corporate email addresses, phone numbers, physical shipping locations, and order amounts. Sending production webhook logs to remote testing utilities exposes your organization to compliance vulnerabilities under GDPR, CCPA, and SOC 2 data protection standards.
This JSON Path Extractor runs entirely on client-side JavaScript. No payload text, query parameters, or extracted results are ever transmitted across the network, stored in cookies, or cached on remote servers. You can disconnect your network connection entirely and the extraction engine will continue to evaluate queries at full performance.
Technical Limitations and Specification Differences
While this tool covers standard RFC 9535 and Stefan Goessner JSONPath syntax, keep the following environmental nuances in mind when translating queries to production systems:
- Script Expressions vs. Comparison Filters: Some historical Goessner implementations in Python or Java permitted arbitrary JavaScript code execution inside parentheses like
[?(@.title.length > 5)]. In the interest of safety and RFC 9535 compliance, this engine evaluates standard boolean and numerical comparisons (==,!=,<,<=,>,>=) and property truthiness, rather than evaluating arbitrary browser JavaScript strings. - Zero-Based Indexing: JSONPath arrays are zero-indexed, meaning the first element is always
[0]. In certain graphical workflow builders like Make.com, visual module collections may display 1-based indexing in their user interface, even though their underlying engine maps zero-indexed arrays. - Payload Size Constraints: Because processing runs on the browser's main JavaScript thread, payloads exceeding 15 megabytes or documents with nesting depths greater than 40 levels may experience noticeable parsing latency. For multi-gigabyte server logs, stream processors like
jqin a command-line environment remain optimal.
Frequently Asked Questions
What is the difference between dot notation and bracket notation in JSONPath?
Dot notation ($.store.book) is the most concise and common syntax, suitable for alphanumeric property names conforming to standard identifier naming rules. Bracket notation ($['store']['book']) is required when a property key contains hyphens, spaces, dots, or special characters, such as $['order-details']['customer-email']. Both notations are completely interchangeable for standard property access.
How do I extract only the last item in a JSON array?
Use negative indexing within brackets: $.items[-1]. The index -1 targets the final element of the array, -2 targets the second to last, and so forth. If you need the last two items as a slice, write $.items[-2:].
Can JSONPath return multiple values as a flat array?
Yes. When you use the wildcard operator [*] or recursive descent $.., JSONPath evaluates every matching node across all matching branches and aggregates them into a single array of results. For example, querying $.line_items[*].sku on an order with three items will output ["SKU-1", "SKU-2", "SKU-3"].
Why does my Zapier or Make step return "undefined" for a mapped field?
An "undefined" error typically occurs when a webhook payload arrives with missing optional keys (such as an empty shipping address for digital goods) or when an array was indexed past its length. Verify that your JSONPath accounts for optional parent nodes, or test your fallback using a filter query to guarantee that only records with populated attributes pass into subsequent workflow steps.
Does JSONPath modify or transform the original JSON payload?
No. JSONPath is strictly a read-only query and extraction language. It locates and reads matching values from the document without mutating, deleting, or altering the original JSON data structure.
