JSON Path & jq Query Tester
Paste JSON and test dot-notation, bracket-notation, array filters, recursive descent and jq-style expressions live in your browser. Great for debugging API responses, kubectl output and config files.
jq, jsonpath) or language libraries.
What is a JSONPath & jq Query Tester?
A JSONPath and jq query tester lets you interactively write and validate query expressions against JSON data in your browser, without writing any code. You paste a JSON document, type a query, and immediately see which values the expression extracts β making it far faster to debug complex queries than running them inside an application or a terminal session.
DevOps and SRE engineers routinely work with JSON-heavy systems: Kubernetes API responses, Prometheus alert rules, Terraform state files, cloud provider CLI outputs, and REST API payloads. Being able to quickly prototype a path expression before embedding it in a script or monitoring rule saves significant time and prevents costly mistakes in production pipelines.
When to Use This Tool
- Writing monitoring alert queries: Validate JSONPath expressions for tools like Alertmanager, Grafana, or AWS CloudWatch before deploying alert rules that process live JSON payloads.
- Filtering kubectl JSON output: Test jq-style expressions against
kubectl get pods -o jsonoutput to pinpoint container statuses, image tags, or resource requests across many namespaces. - Building data pipelines: Prototype field extraction paths when writing Python, Go, or Node.js code that processes API responses, so you can confirm the correct key path before embedding it in production logic.
- Debugging Terraform and cloud CLI output: Quickly navigate nested JSON structures returned by
aws,gcloud, orterraform show -jsonto find the exact field path you need.
How It Works
The tool parses your JSON input using the browser's native JSON.parse() and then evaluates the query expression using a built-in JavaScript engine that implements dot notation, the JSONPath specification (including wildcards, array slices, and filter expressions), and a subset of jq syntax (including keys, length, type, map(), and select()). All evaluation happens client-side β your JSON data never leaves your browser.
Frequently Asked Questions
What is JSONPath?
JSONPath is a query language for JSON data, analogous to XPath for XML documents. It allows you to navigate and extract values from complex, deeply nested JSON structures using concise path expressions. Expressions start with $ (the root), followed by dot or bracket notation to traverse keys and arrays. For example, $.users[*].email returns the email field from every user object in the users array. JSONPath is widely used in API testing tools like Postman, monitoring systems, and data transformation pipelines.
What query modes does this tool support?
The tool supports three query modes. Dot notation is the simplest: just write a path like store.books[0].title without any leading symbol. JSONPath mode follows the standard specification, requiring a leading $ and supporting full features including recursive descent (..), wildcards ([*]), and filter expressions ([?(@.price < 10)]). The jq mode implements popular jq built-ins like keys, values, length, type, map(.field), and select(.field == "value"), giving you an interactive alternative to the jq command-line tool without leaving your browser.
How do I filter an array by a field value in JSONPath?
Use a filter expression with the syntax [?(@.fieldName=="value")]. The @ refers to the current array element being evaluated, and you can use comparison operators like ==, !=, >, and <. For example, $.products[?(@.category=="electronics")].name returns the names of all products in the electronics category. Filter expressions are extremely useful when processing API responses that contain mixed-type arrays and you need to isolate records matching specific criteria.