What is the JSONPath Tester?
ToolMint's JSONPath Tester evaluates an RFC 9535 JSONPath expression against pasted JSON. Each result includes the matched value, its standardized normalized JSONPath and an RFC 6901 JSON Pointer for the exact location.
Evaluation runs in a dedicated Web Worker in the current browser tab. ToolMint does not upload the JSON, expression, member names, matched values or paths. The tool is intended for API responses, configuration data, test fixtures and other small or medium JSON documents that fit its browser-safety limits.
JSONPath is a selection language, not a programming language. This implementation does not execute JavaScript, legacy script selectors or user-defined functions.
Try a JSONPath expression
Paste this small JSON document into the tool:
{"products":[{"name":"Camera","price":125},{"name":"Tripod","price":45}]}
Enter $.products[?(@.price < 100)].name as the expression and select Evaluate. The single matching value is "Tripod". Its normalized path is $['products'][1]['name'] and its JSON Pointer is /products/1/name. Change the price threshold or a product price to see how the match changes. This example uses an RFC 9535 filter and runs locally in your browser.
How to test a JSONPath expression
- Paste a valid JSON document into JSON data.
- Enter an RFC 9535 expression in JSONPath expression.
- Select Evaluate, or press Ctrl+Enter on Windows and Linux or Cmd+Enter on macOS.
- Review the match count and each returned value.
- Copy the bounded result JSON or paths, download a values array, or save a match report with locations.
The Load Example action provides a fictional store document and a child-selector expression. Format JSON applies two-space indentation with the browser's native JSON parser and serializer. For sorting, minifying and deeper syntax inspection, use the JSON Formatter.
No matches is a successful evaluation. It means the expression parsed correctly but did not select a node in the current document. You can still download the empty values array or match report.
Download matched values or a match report
After evaluation, choose Download values JSON for a plain JSON array such as ["Tripod"]. Choose Download match report when you also need the selected locations. The report contains a format name, version, match count and a matches array:
{
"format": "ToolMint JSONPath match report",
"version": 1,
"matchCount": 1,
"matches": [
{"path": "$['products'][1]['name']", "pointer": "/products/1/name", "value": "Tripod"}
]
}
Both files preserve the evaluator's result order and duplicate matches. A root match has path $ and an empty-string Pointer. A selected JSON null remains null; it is different from an omitted value preview.
Downloads are generated locally only when you select a download button. They do not contain your full source document or expression unless that document itself is selected as a value. Treat downloaded results as sensitive when they contain private data. Editing either input clears the previous results and download controls.
The filenames are jsonpath-values.json and jsonpath-match-report.json. Each export has an 8 MiB UTF-8 limit, including indentation and paths. If any values were omitted by the 2 MiB combined preview budget, both downloads and Copy result JSON are disabled. Copy paths remains available. Narrow the query and evaluate again to download complete values; the tool does not substitute fake null values for omitted data.
Keep large IDs as strings
The tester checks numeric source tokens before converting JSON or parsing query literals. It rejects integers outside JavaScript's safe range of -9,007,199,254,740,991 to 9,007,199,254,740,991, numbers that overflow to infinity, and nonzero numbers that underflow to zero. Format JSON uses the same checks and leaves rejected input unchanged.
For example, {"id":9007199254740993} is rejected because JavaScript would round the numeric ID. Use {"id":"9007199254740993"} to retain that exact ID, and compare it with a quoted string in a filter: $[?(@.id == "9007199254740993")] for an array of objects. Quoted member names and string values are not treated as numbers.
This is a guard against unsafe integers and extreme numeric ranges, not arbitrary-precision arithmetic. Ordinary decimals still use binary floating-point values and may round. Formatting and downloads can normalize 1.2300 to 1.23, 1e3 to 1000 and -0 to 0. Keep exact decimal text in strings when spelling or decimal precision matters. Do not expect string values to participate in numeric comparisons as numbers.
These limits follow the JavaScript safe integer range and the interoperability considerations in RFC 8259, section 6.
What RFC 9535 JSONPath is
RFC 9535 standardizes JSONPath syntax and semantics. A query begins with $, which identifies the root value, followed by segments that select children or descendants. A query can return zero, one or many nodes.
ToolMint deliberately follows this standardized dialect. Older JSONPath libraries may accept JavaScript expressions, custom functions or operators that are not in RFC 9535. Those extensions are not portable and are not enabled here.
The evaluator preserves the returned nodelist order and duplicate matches. Array selection order is deterministic under the RFC rules. Object member order for wildcards and descendant selections should not be treated as portable across every implementation.
JSONPath syntax examples
| Expression | Purpose |
|---|---|
$ |
Select the root value |
$.store |
Select the store child with member-name shorthand |
$['store'] |
Select the same child with bracket notation |
$.store.book[0] |
Select the first array item |
$.store.book[-1] |
Select the last array item with a negative index |
$.store.book[*].title |
Select every book title |
$..price |
Select descendant members named price |
$.store.book[0:3:2] |
Select a slice using start, end and step |
$.store.book[?(@.price < 10)] |
Select books whose price is below 10 |
Member-name shorthand is convenient for simple names. Use quoted bracket notation for keys containing spaces, dots, quotes or other characters that shorthand cannot represent unambiguously.
Child, wildcard and descendant selectors
A child segment selects immediate children. $.store.book follows the store member and then the book member. A wildcard such as [*] selects every child at one level, so $.store.book[*].title selects the title of each array item.
A descendant segment searches below the current node. $..price can find prices at different nesting levels. Descendant queries are useful for exploration, but expressions such as $..* can create very large result sets. Start with a narrower path when you know the document structure.
The worker has up to 30 seconds to load its local engine. After the worker signals that it is ready, a separate two-second evaluation limit begins; engine loading does not consume that evaluation window. The tool also rejects a query when match 1,001 is detected. These limits keep broad selectors from monopolizing the browser tab; they do not alter JSONPath semantics for results that complete within the limits.
Array indexes and slices
An index selector chooses one array position. Index 0 is the first item. RFC 9535 also defines negative indexes relative to the end of the array, so [-1] selects the last item when one exists. An out-of-range index returns no match rather than an error.
Slice syntax is [start:end:step]. Any component may be omitted where the grammar permits it. [1:4] selects indexes 1 through 3, while [::-1] traverses an array in reverse. A zero step selects no elements under RFC 9535 slice semantics; it is not treated as a JavaScript or Python expression.
JSONPath filter expressions
Filters select array or object children that satisfy a logical expression. The current node inside a filter is referenced with @, while $ still identifies the query root.
RFC filters support existence tests, comparisons, &&, || and !. For example, $.store.book[?(@.price < 10 && @.available == true)] selects children with both a qualifying price and availability value. Parentheses can clarify grouping, but ToolMint does not describe them as mandatory where the RFC grammar makes them optional.
A test such as ?@.available checks whether the selected node exists; it does not interpret the JSON boolean value as JavaScript truthiness. Compare explicitly with true or false when the stored boolean value matters.
JSONPath functions
RFC 9535 defines five functions used in filter expressions:
length()returns the length of a string, array or object where defined.count()counts nodes in a nodelist.match()tests whether an entire string matches an I-Regexp pattern.search()tests whether a string contains a matching portion.value()converts a singular nodelist to its contained value where defined.
ToolMint supports these functions through the selected RFC-focused evaluator. Arbitrary custom functions are rejected. The legacy =~ operator is not supported; use match() or search() according to the intended full-string or substring behavior.
JSONPath vs JSON Pointer
JSONPath selects nodes by query and can produce multiple results. RFC 6901 JSON Pointer identifies one exact location through slash-separated reference tokens. They solve related but different problems and are not interchangeable query languages.
For every JSONPath match, ToolMint derives a Pointer from the evaluator's structured path segments. A slash in a member name becomes ~1, and a tilde becomes ~0. The Pointer for the root value is the empty string. The interface displays that empty root Pointer as (root) so the field does not appear broken.
Normalized JSONPath always uses unambiguous bracket notation, such as $['store']['book'][0]['title']. This differs from JSON Pointer /store/book/0/title, even though both can identify the same selected location in this example.
Why a JSONPath returns no matches
A valid expression may return no matches because a member is absent, an array index is outside its bounds, a filter condition is false, or the path assumes a different nesting level. Check key spelling and capitalization, then inspect whether the current value is an object, array or scalar at each segment.
JSON values are type-sensitive. The string "10" is not the number 10, and an existence test is not the same as a boolean truthiness test. Use the JSON Schema Validator when you need to verify that a payload follows a declared data contract rather than select values from it.
When comparing two payloads or query outputs, the Text Diff Checker can highlight textual changes. The JSON to YAML Converter and YAML to JSON Converter support configuration-format workflows after you have inspected the required nodes.
Missing fields, null and numeric strings: a reproducible filter test
The Try a filter example buttons load this fictional document. Choose Numeric filter, Missing field or Explicit null, then select Evaluate. Loading an example replaces your current input.
{"items":[{"id":"number","price":45},{"id":"string","price":"45"},{"id":"null","price":null},{"id":"missing"}]}
| Expression | Returned value | JSON Pointer |
|---|---|---|
$.items[?(@.price < 100)].id |
"number" |
/items/0/id |
$.items[?(!@.price)].id |
"missing" |
/items/3/id |
$.items[?(@.price == null)].id |
"null" |
/items/2/id |
The numeric comparison does not convert "45" into 45. The missing-field test checks whether a node exists; an explicit null is still a present value. Equality with null therefore selects a different item from the missing-field test. To reproduce an empty result, change the numeric comparison to @.price < 40: none of these rows qualifies.
If an API should always send a number, check that contract with the JSON Schema Validator. If you need editable types for rows with missing or null properties, try the JSON to TypeScript and Zod example. JSONPath selects data; it does not repair types or enforce a contract.
Browser-local privacy and safety limits
JSON parsing and structural checks happen in the current tab. JSONPath evaluation happens in a dedicated Web Worker that ToolMint terminates after success, failure, replacement, timeout or component unmount. No API route, URL loader, file upload, localStorage or sessionStorage is used. Download buttons create local files through the browser; ToolMint does not store those files.
The JSON input is limited to 2 MiB, 100 nesting levels, 100,000 values and 20,000 items in one array. Expressions are limited to 2,048 characters. Results are limited to 1,000 matches and a 2 MiB combined value-preview budget. If values exceed the preview budget, their paths remain available while oversized value previews are omitted. Values downloads and match reports require complete previews and have a separate 8 MiB UTF-8 export limit.
These controls reduce the risk of unresponsive browser work but cannot guarantee that every pathological query will complete. The Worker time budget provides a final boundary for expensive filters and broad descendant selection.
Analytics, when allowed by your privacy preferences, receive only generic action and output-format labels, action outcomes and a coarse match-count range. ToolMint does not include JSON, expressions, parser messages, property names, values, normalized paths or JSON Pointers in analytics.
RFC 9535 and legacy JSONPath differences
JSONPath existed in multiple library-specific forms before RFC 9535. Some implementations added JavaScript script selectors, arbitrary expression evaluation, custom callbacks or the =~ regex operator. ToolMint does not execute or silently translate those constructs.
Use RFC comparison and logical syntax inside filters. Use match() and search() for standardized regular-expression behavior. If an expression was copied from a legacy library, review that library's dialect and rewrite the intent explicitly rather than assuming identical semantics.
Browse more private JSON and API utilities in the Developer category.
Sources
- RFC 9535: JSONPath
- RFC 6901: JavaScript Object Notation (JSON) Pointer
- jsonpath-rfc9535 implementation documentation
The FAQ section below is generated from the ToolMint registry so visible answers and FAQ structured data remain synchronized.