JSONPath Tester
Query JSON live with JSONPath — filter, slice, and recurse, and see each matched value with its path, all in your browser.
Prefer the terminal? See the CLI equivalent →About the JSONPath Tester
- Live JSONPath evaluation
- Syntax highlighting
- Accepts JSON from other tools
- Instant results
- 100% private — runs in your browser
- Free, no sign-up
JSONPath is a query language for JSON — the JSON equivalent of XPath for XML. You write a path that walks into objects and arrays, optionally filtering by conditions, and it returns every value that matches. It is the quickest way to pull specific fields out of a large API response or config file without writing code.
This tester evaluates your expression against a JSON document live and lists each match with its value and its exact location path (for example $['store']['book'][0]['author']), so you can see not just what matched but where it is. Filter expressions are evaluated safely — no arbitrary JavaScript runs — and everything happens in your browser, so your data is never uploaded.
JSONPath starts from the root $ and supports child access (.key), recursive descent (..key), wildcards (*), array indexing and slices ([0], [0:2]), and predicate filters ([?(@.price < 10)]). It covers the vast majority of everyday “get me these fields” tasks.
How to use it
- Paste your JSON into the editor, or load a file with the ⬆ upload button in its toolbar (a sample is provided to start).
- Type a JSONPath expression — matches update live, are highlighted in the editor, and the count shows above it.
- Read the results: each match shows its location path and value. Copy a single value, copy all matches as a JSON array, or copy the whole document from the editor toolbar.
- Fix any reported error — a JSON parse error points at the document; a query error points at the expression.
JSONPath syntax reference
- $
- The root of the document; every path starts here.
- .key / ['key']
- A child property by name.
- ..key
- Recursive descent — matches the property at any depth.
- *
- Wildcard — all properties of an object or all elements of an array.
- [n] / [-1]
- Array element by index (negative counts from the end).
- [start:end]
- Array slice, end-exclusive (e.g. [0:2] is the first two).
- [?(@.x < 10)]
- Filter — keep items where the expression on @ (the current item) is true.
- [a,b]
- Union — select multiple names or indices at once.
Frequently asked questions
What is the difference between JSONPath and jq?+
JSONPath is a selector language: it picks values out of a JSON document by path and filter. jq is a full programming language for JSON that can also transform, reshape, compute, and build new output. For “extract these fields”, JSONPath is simpler and enough; for heavier transformation pipelines, jq is more powerful.
Is my JSON uploaded anywhere?+
No. Parsing and evaluation happen entirely in your browser, and filter expressions run under a safe evaluator with no arbitrary code execution. Nothing you paste leaves your device.
How do filter expressions work?+
Inside [?(…)], @ refers to the current item being tested. So $..book[?(@.price < 10)] keeps every book whose price is under 10. You can compare with < > <= >= == != and combine conditions with && and ||.
What does the path shown next to each match mean?+
It is the normalized JSONPath to that specific value, such as $['store']['book'][0]['author']. It tells you exactly where the value lives and is itself a valid expression you can copy to target that one node.
JSONPath or XPath?+
They solve the same problem for different formats: JSONPath queries JSON, XPath queries XML/HTML. The syntax rhymes — $ vs /, .. for recursion in both, and predicate filters — so if you know one, the other is easy.
Works well with
JSONPath Tester chains with these tools — send your result straight on:
Related tools
Code Formatter
Format and beautify JSON, YAML, TOML, XML, HTML, and CSS — with JSON/CSS minify and JSON schema validation.
Data Diff
Compare two JSON, YAML, or TOML documents by structure, not text: added, removed, and changed values with their paths. Key order and formatting are ignored. Runs in your browser.
HAR Viewer
Open a .har network export and explore its requests, sizes, status codes, and a timing waterfall — entirely in your browser. Nothing is uploaded.
JSON ↔ YAML ↔ TOML
Convert structured data between JSON, YAML, and TOML, live in your browser.
JSON to SQL
Infer a SQL CREATE TABLE from a JSON sample or a JSON Schema — column types, nullability, and a primary-key guess — for PostgreSQL, MySQL, or SQLite. Runs in your browser.
JSON to Types
Turn a JSON sample or a JSON Schema into TypeScript, Zod, Go structs, Python dataclasses, Kotlin data classes, or Java records/Lombok. Infers optional and nullable fields. Runs in your browser.