JSONPath Tester
Paste a JSON document and type a JSONPath expression like $..book[?(@.price<10)]. The tester evaluates it against the document and shows every matching value, with the exact path of each match. Useful for validating the query you are about to paste into a script or an API spec (Postman, k6, JMeter all speak JSONPath).
How to test a JSONPath expression
-
1
Paste the JSON document
Any valid JSON: object, array, deeply nested.
-
2
Type the expression
Start with `$` for root. Use `.` for child, `..` for recursive descent, `[*]` for wildcard.
-
3
See the matches live
Each match is shown with its value and full JSONPath, highlighted in the original document.
-
4
Copy the results
Copy matches as a JSON array, or copy each individual path for use in downstream code.
JSONPath syntax reference
| Expression | Meaning |
|---|---|
$ |
Root element |
$.store |
Child of $ named store |
$["store"] |
Same, bracket form |
$..author |
All author properties at any depth |
$.store.book[*] |
Every book in the store |
$.store.book[0] |
First book |
$.store.book[-1:] |
Last book |
$.store.book[0:2] |
First two books (slice) |
$.store.book[?(@.isbn)] |
Books with an isbn property |
$.store.book[?(@.price < 10)] |
Books cheaper than 10 |
$.store.book[?(@.category == "fiction")] |
Fiction books |
$..* |
Every value, everywhere |
Filter expressions
Filter expressions use @ to refer to the current node. The tester supports the common operators ==, !=, <, >, <=, >=, &&, ||, and regex =~.
$.items[?(@.qty >= 10 && @.price < 50)]
JSONPath dialects
There are several JSONPath implementations with small incompatibilities. This tester follows the Goessner original spec and the RFC 9535 refinements, which are compatible with:
- Jayway JsonPath (Java)
- jsonpath-plus (JavaScript)
- jsonpath-rw (Python)
- jq basic path expressions
Incompatible features (like script expressions with arbitrary JS) are flagged in the error panel.
When JSONPath beats a full parser
- Test assertions: Postman’s
pm.expect(jsonData).to.have.jsonPath(...)takes a path. - Config extraction: pull one value out of a huge API response without a library.
- Load-testing scripts: k6, JMeter and Gatling all support JSONPath for checks.
- Kubernetes / AWS CLI:
--queryand--jsonpathflags let you shape output from the command line.
Common mistakes
- Using
.on an array.$.users.0.nameis wrong; use$.users[0].name. - Forgetting
..for depth. A path like$.nameonly matches top-levelname; use$..namefor all. - Confusing JSONPath with jq. jq is a superset with control flow and transformations; JSONPath is purely for extraction.
- Regex anchoring.
=~ /foo/matches substrings; use/^foo$/for exact.
Frequently Asked Questions
JSONPath is a pure extraction language, select, filter, slice. jq is a full query / transformation language with control flow, variables and functions. For simple extraction, JSONPath is more portable; for transformations, use jq.
The Goessner original spec plus the RFC 9535 refinements, matching Jayway JsonPath (Java) and jsonpath-plus (Node). Dialect-specific extensions (script expressions with arbitrary code) are not supported.
Yes. $..book[?(@.title =~ /^Harry.*/)] matches all books whose title starts with “Harry”. Use ^ and $ for full-match behaviour.
Yes. Both the JSON and the JSONPath evaluator live in your browser. Your document and queries never leave the tab.
Related Tools
ASCII Table Reference
Full ASCII table from 0 to 127 with decimal, hex, octal, binary, standard names and HTML numeric-reference notation, including NUL, LF and DEL.
Color Palette Generator
Generate monochromatic, analogous, complementary, triadic or tetradic color palettes from a base HEX color and export copy-ready CSS variables.
HTML Character Reference
Searchable list of HTML entities, their named and numeric codes, and a one-click copy for special characters and symbols.
HEX Color Picker
Pick or enter a HEX colour and get RGB, HSL, approximate CMYK, relative luminance and contrast ratios against white and black.
FPS Counter
Measure browser FPS with requestAnimationFrame, smoothing, min/max frame rate, warnings and an optional graph. Runs locally with no upload or API.
JSON Formatter
Paste JSON to pretty-print with 2 or 4 spaces, minify it to compact output, or run a quick syntax check before copying the result.
Tool available in other languages
- Testeur JSONPath [FR]
- JSONPath-testare [SV]
- เครื่องมือทดสอบ JSON Path [TH]
- أداة اختبار مسارات JSON (JSONPath) [AR]
- JSON Path Tester [ID]
- Công cụ kiểm thử JSONPath [VI]
- JSONPath 테스터 [KO]
- JSONPath-Tester [DE]
- Probador de JSONPath [ES]
- JSON Path Tester [NL]
- Tester JSONPath [PL]
- JSONPath テスター [JA]
- Testador de JSONPath [PT]
- JSONPath Tester [RU]
- JSONPath Test Aracı [TR]
- JSON路径测试器 [ZH]
- Tester JSONPath [IT]