Free JSON Path Extractor

Paste JSON and enter a path expression like $.store.book[0].title to extract values.

Result

Enter JSON and a path, then click Extract.

How It Works

  1. Paste your JSON: Enter any JSON object or array in the input field.
  2. Enter a JSONPath expression: Type a path like $.store.book[*].author or $..name to select the data you need.
  3. View extracted results: Matching values appear in the output panel instantly. Copy the result or export it.

Why Use JSONPath Extractor?

When working with complex API responses or deeply nested JSON, extracting specific values by hand is slow and error-prone. JSONPath is the query language for JSON, similar to XPath for XML. It lets you pinpoint exactly the data you need using a concise path expression, whether that is a single nested value, all items in an array, or filtered records matching a condition. This tool makes JSONPath exploration interactive without writing code.

Features

Frequently Asked Questions

What is JSONPath?

JSONPath is a query language for JSON documents, analogous to XPath for XML. A path like $.users[*].name selects the name field from every object in the users array. It is widely used for API testing, data transformation, and JSON processing.

How do I filter array items by a condition?

Use a filter expression: $.items[?(@.price < 50)] returns all items where price is below 50. The @ symbol refers to the current element being evaluated.

Does it support recursive search?

Yes. The .. operator searches recursively through all levels. For example, $..name finds all name keys anywhere in the JSON structure, regardless of nesting depth.

From a blog post to RFC 9535: the 17-year road to a JSONPath standard

Stefan Gössner proposed JSONPath in a single blog post in February 2007, adapting the XPath idea to JSON. He published a reference JavaScript implementation, sketched the syntax (the $ root, dot and bracket child operators, .. for recursive descent, * for wildcard, [start:end:step] array slicing, [?(...)] filter expressions) and the wider ecosystem ran with it. Implementations proliferated: jsonpath for JavaScript, JsonPath for Java, jq (Stephen Dolan, 2012) which is JSONPath-adjacent but its own thing, jsonpath-ng for Python, JMESPath (AWS, 2014) as a stricter rival. The trouble: every implementation drifted. Filter syntax, recursion semantics, regex matching, root identifiers, all subtly different across libraries. A 2023 comparison study by Carsten Bormann et al. tested 41 distinct JSONPath implementations against the same input and got 41 different result sets for the same expression. The IETF JSONPath Working Group convened in 2020 to fix this. RFC 9535 «JSONPath: Query Expressions for JSON» was published in February 2024, becoming the first formal standard for JSONPath, 17 years after Gössner's original post. RFC 9535 codifies the syntax, defines a normalized output format, requires Unicode normalization for string comparisons, and adds a conformance test suite.

JSONPath syntax cheat sheet

The seven operators that cover most real-world queries:

Where you actually reach for JSONPath

Mistakes that bite

JSONPath vs jq vs JMESPath vs JSON Pointer

More frequently asked questions

Is JSONPath the same as XPath?

Inspired by it, not identical. XPath was finalised by W3C in 1999 for XML, JSONPath was sketched by Gössner in 2007 to bring the same idea to JSON. The biggest differences: JSONPath uses . and [] instead of /, JSONPath has no concept of XML namespaces or attributes, JSONPath standardised much later (2024 vs 1999), so for years it was a de-facto syntax with many incompatible implementations.

Why does the same JSONPath give different results in different tools?

Because JSONPath wasn't standardised until RFC 9535 (February 2024). Before that, every implementation made its own choices about filter syntax, regex support, root identifiers, escaping rules, and edge cases (empty arrays, missing keys, type coercion in filters). A 2023 IETF working-group study tested 41 implementations on the same input and got 41 different result sets. RFC 9535 fixes this for new and updated libraries; older libraries will diverge until they migrate. Always check whether your library claims «RFC 9535 conformance».

Can I modify the JSON with JSONPath, or only read?

RFC 9535 defines JSONPath strictly as a query language: it returns values from a document, it does not mutate. To modify JSON, use JSON Patch (RFC 6902), which uses JSON Pointer paths and add/remove/replace/copy/move/test operations. Some libraries combine both (e.g. jsonpath-plus in JavaScript has an apply() mutation extension) but that is not standard JSONPath.

Does JSONPath support regular expressions in filters?

RFC 9535 added two regex functions: match(node, regex) matches the whole string, search(node, regex) matches any substring. Example: $.book[?(match(@.isbn, "^978-"))]. The regex flavour is I-Regexp (RFC 9485, a profile of XML Schema regex), not PCRE or JavaScript regex. Older libraries used their host language's regex flavour, which makes regex queries especially non-portable.

Is my JSON sent anywhere when I use this tool?

No. Path evaluation runs entirely in your browser's JavaScript engine. Open the Network tab in DevTools and run a query, you will see zero outbound requests during evaluation. Safe for API responses with secrets, database dumps with PII, or configuration files containing credentials.

Related Tools

JSON Tree Viewer JSON Formatter JSON to CSV JSON Compare