# JSONPath Query Tool

Query arbitrary JSON with JSONPath expressions, preview matches, switch output modes, and save reusable query templates

> Canonical page: https://test.elysiatools.com/en/tools/jsonpath-query-tool

- **Category:** Development

- **Keywords:** jsonpath, json query, api, nested json, template, extract

## Overview

The JSONPath Query Tool allows developers and data analysts to extract specific data from complex, nested JSON payloads using standard JSONPath expressions. You can instantly preview matches, format the output as JSON, structured tables, or Markdown, and save frequently used queries as reusable templates for faster API debugging and data extraction.

## Inputs

- **JSON Input** (textarea): { "store": { "book": \[{ "author": "Nigel Rees" }\] } }
- **JSONPath Expression** (text)
- **Output Format** (select)
- **Maximum Matches** (number)
- **Save Query Template** (checkbox)
- **Template Name** (text): Store authors

## When to use

- When you need to extract specific fields or arrays from deeply nested API responses.
- When filtering large JSON datasets based on specific conditions, such as user roles or active statuses.
- When generating Markdown or table reports directly from raw JSON data without writing custom scripts.

## How it works

- Paste your raw JSON payload into the input area.
- Enter a valid JSONPath expression to target the specific nodes or arrays you want to extract.
- Select your preferred output format, such as JSON, Table, or Markdown, and set a maximum match limit.
- View the extracted results instantly and optionally save the query as a template for future use.

## Use cases

- Extracting a list of specific IDs or names from a large, nested API response.
- Filtering user or product arrays to find records matching specific attributes.
- Converting raw JSON configuration files into readable Markdown documentation.

## Frequently asked questions

### What is JSONPath?

JSONPath is a query language for JSON, similar to XPath for XML, that allows you to select and extract specific data from complex JSON structures.

### Can I format the extracted data?

Yes, you can choose to output the matched results as raw JSON, a structured table, or Markdown blocks.

### Is there a limit to the number of matches returned?

You can configure the maximum number of matches to return, ranging from 1 up to 500 results per query.

### How do query templates work?

By checking the 'Save Query Template' option and providing a name, you can save your JSONPath expression to quickly reuse it on future JSON payloads.

### Can I filter arrays based on specific values?

Yes, JSONPath supports filter expressions like `[?(@.role == "admin")]` to extract only the objects that meet your specific criteria.

## Related tools

- [JSON Schema to Zod Schema Converter](https://test.elysiatools.com/en/tools/json-schema-to-zod-schema-converter): Convert JSON Schema JSON/YAML definitions into ready-to-use Zod schemas with nested objects, arrays, enums, and common validation rules
- [ECharts Theme Token Extractor](https://test.elysiatools.com/en/tools/echarts-theme-token-extractor): Extract design tokens — colors, numbers, font sizes and strings — from an ECharts theme JSON and export them straight into your design system. Paste a theme object (the kind registered via echarts.init(dom, themeName)) and the tool walks every leaf, tagging each color (with optional named/rgb → hex normalization), spacing number, font size and string, then emits clean CSS variables, a Tailwind theme.extend config, Style Dictionary tokens.json, or SCSS variables. Bridges the gap between an ECharts visualization theme and Figma/CSS/Tailwind design tokens without copying each value by hand.
- [Image Palette to Design Tokens](https://test.elysiatools.com/en/tools/image-to-design-tokens): Extract a dominant color palette from an image (k-means clustering), then export it as CSS variables, SCSS variables, a Tailwind config, or JSON design tokens — with named colors and an auto-generated shade scale for each
- [JSON Path Extractor](https://test.elysiatools.com/en/tools/json-path-extractor): Query JSON with JSONPath or JMESPath-style expressions, inspect matched paths, and highlight extracted values in the original document
- [LLM Tool-Calling JSON Schema Builder](https://test.elysiatools.com/en/tools/llm-tool-calling-json-schema-builder): Define an LLM tool once and emit validated function-calling payloads for OpenAI, Anthropic and Gemini.
- [MCP Server Contract Tester — stdio + WebSocket Transports, JSON Schema 2020-12 Tool Validation](https://test.elysiatools.com/en/tools/model-context-protocol-mcp-server-tool-schema-stdio-websocket-transport-contract-tester): End-to-end Model Context Protocol contract testing: JSON-RPC 2.0 initialize handshake and version negotiation over stdio (newline-delimited) and WebSocket (one message per text frame), tools/list inputSchema object-root and draft 2020-12 compilation, resources/list + read, prompts/list + get, ping, -32601 error semantics, sampling/createMessage round-trip, and framing discipline — with an embedded reference server for offline self-verification.
- [OCR PDF to Structured JSON Bridge](https://test.elysiatools.com/en/tools/ocr-pdf-to-structured-json-bridge): Extract the PDF text layer with geometry (lines by y-position, tables by column gaps, headings by font size, colon key-value pairs), then fill a user-supplied JSON Schema field by field — labels matched by normalized keys, values coerced to declared types and validated with ajv.
- [Remix Pack Builder](https://test.elysiatools.com/en/tools/audio-remix-pack-builder): Turn one music track into a complete remix pack: BPM, key (with Camelot), cue points, four Demucs stems, an MP3 preview, and a metadata JSON — all in one ZIP.

## Samples

- [JWT Samples](https://test.elysiatools.com/en/samples/jwt-samples): Comprehensive JWT examples from basic token structure to advanced security implementations
- [Postman Collections - API Testing](https://test.elysiatools.com/en/samples/postman-collections): Comprehensive Postman collection examples including API testing, automation scripts, environment variables, mock servers, and advanced testing patterns for REST APIs
- [Terraform Plan JSON Samples](https://test.elysiatools.com/en/samples/terraform-plan-json-samples): Sample Terraform plan JSON files exported from terraform show -json style payloads for dependency visualization and change review
- [macOS Networking Objective-C Samples](https://test.elysiatools.com/en/samples/macos-networking-objectivec): macOS Objective-C networking examples including URLSession, HTTP requests, WebSocket, and network reachability

## Related content

- [HN Entity Recommendation Review and Ranking Handoff](https://test.elysiatools.com/en/hubs/hn-entity-recommendation-review-and-ranking-handoff): Turn an authorized HN comment export into a traceable recommendation table: preserve context, separate praise from critique and reading intent, review disputed votes and deliver reconciled counts.
- [JSON Field Extraction, Transformation, and Provenance](https://test.elysiatools.com/en/hubs/json-extraction-transformation-and-provenance): Extract selected JSON fields by path, reshape the payload with JSONata, and record field-level provenance without claiming business-semantic validation.
