# JSONPath REPL Playground

An interactive JSONPath REPL that runs multi-step query pipelines against any JSON. Write one JSONPath expression per line (e.g. $..book[?(@.price<10)] then $[0:5]) and see each step's matches with counts, paths, and values — plus a shareable URL that encodes your data and pipeline. Supports recursive descent ($..), wildcards ([*]), filters ([?(@.price<10)]), slices ([0:5:2]), and negative indices.

> Canonical page: https://elysiatools.com/en/tools/jsonpath-repl-playground

- **Category:** Development

- **Keywords:** jsonpath, json, repl, playground, pipeline, query, jmespath, json path, debug, api, data exploration, filter, slice, recursive descent

## Overview

A read-eval-print loop for JSONPath queries, built for debugging API responses and exploring JSON datasets:

1. **Paste JSON** into the data field (defaults to the classic "store/book" example).
2. **Write a pipeline** — one JSONPath expression per line; each line runs against the previous line's output.
3. **See every step** — each line renders its own card with the expression, match count, and matched nodes.
4. **Share it** — generates a URL-safe token encoding your JSON + pipeline.
5. **Supported syntax** — `$` root, `.key` / `['key']`, `*` wildcard, `..` recursive descent, indices, `[start:end:step]` slices, `[?(expr)]` filters.

Runs fully offline.

## Inputs

- **JSON data** (textarea): { "store": { "book": \[ { "category": "reference", "author": "Nigel Rees", "title": "Sayings of the Century", "price": 8.95 }, { "category": "fiction", "author": "Evelyn Waugh", "title": "Sword of Honour", "price": 12.99 }, { "category": "fiction", "author": "Herman Melville", "title": "Moby Dick", "price": 8.99 }, { "category": "fiction", "author": "J. R. R. Tolkien", "title": "The Lord of the Rings", "price": 22.99 } \], "bicycle": { "color": "red", "price": 19.95 } } }
- **Pipeline (one step per line)** (textarea): $..book\[?(@.price < 10)\] $\[*\].title
- **Render mode** (select)
- **Max results** (number)
- **History title** (text): Optional label saved with this query so you can find it again.

## When to use

- When debugging complex API responses that require filtering, slicing, or recursive descent to extract specific nested values.
- When building multi-step JSONPath pipelines where the output of one query serves as the input for the next.
- When you need to share a specific JSON dataset and its corresponding query pipeline with team members via a shareable URL.

## How it works

- Paste your raw JSON data into the input field.
- Write your query pipeline in the text area, using one JSONPath expression per line to process data sequentially.
- Select your preferred render mode (Values only, Paths + values, or Raw) and set the maximum results limit.
- Inspect the generated cards showing the match count, paths, and values for each step of your pipeline.

## Use cases

- Extracting and filtering specific fields from large nested API responses.
- Testing and validating complex JSONPath expressions before implementing them in application code.
- Documenting and sharing JSON data extraction steps with team members using encoded URLs.

## Frequently asked questions

### What is a multi-step query pipeline in this tool?

It allows you to chain queries sequentially. Each line in the pipeline text area runs its JSONPath expression against the output of the previous line.

### Does this tool support filtering and slicing?

Yes, it supports standard JSONPath filter expressions like [?(expr)] and array slicing syntax like [start:end:step].

### Is my JSON data sent to a server?

No, the playground runs entirely offline in your browser, ensuring your data remains private.

### How does the sharing feature work?

It generates a URL-safe token containing your JSON data and pipeline configuration, which you can copy and share with others.

### What render modes are available?

You can choose between 'Values only' (pretty JSON), 'Paths + values' (showing the exact JSONPath location for each match), and 'Raw'.

## Related tools

- [Treemap Generator](https://elysiatools.com/en/tools/treemap-generator): Render hierarchical data as a squarified treemap where area encodes each item's share
- [Data URI Generator](https://elysiatools.com/en/tools/data-uri-generator): Convert files into Data URIs (Base64 or percent-encoded) for inlining images, fonts, and assets directly into HTML, CSS, or Markdown
- [API Latency Budget Planner](https://elysiatools.com/en/tools/api-latency-budget-planner): Plan and visualise an API latency budget. Enter a P99 target (e.g. ≤ 300ms) and per-stage allocations (DNS, TCP, TLS, TTFB, Processing, Network) to see a live waterfall, budget utilisation, and over-budget warnings. Optionally paste an OpenTelemetry or Datadog trace to reverse-engineer a measured allocation.
- [API Request Code Snippet Generator](https://elysiatools.com/en/tools/api-request-code-snippet-generator): Generate cURL and common language code snippets from a request URL, method, headers, query parameters, and body
- [API Response Contract Validator](https://elysiatools.com/en/tools/api-response-contract-validator): Validate a real API response JSON against the response schema declared in an OpenAPI 3.x specification
- [Distributed Trace Decoder & Waterfall Visualizer](https://elysiatools.com/en/tools/distributed-trace-decoder-waterfall-visualizer): Decode Jaeger, Zipkin, or OpenTelemetry trace JSON and render span timing, dependencies, and error hotspots as an interactive waterfall report
- [JSON Diff Visualizer](https://elysiatools.com/en/tools/json-diff-visualizer): Compare two JSON payloads and render a visual HTML diff with path-level additions, removals, changes, and statistics
- [JSONPath Query Tool](https://elysiatools.com/en/tools/jsonpath-query-tool): Query arbitrary JSON with JSONPath expressions, preview matches, switch output modes, and save reusable query templates

## Samples

- [NDJSON Samples](https://elysiatools.com/en/samples/ndjson-samples): Downloadable NDJSON files from simple to complex for ingestion, streaming, and pipeline tests
- [JWT Samples](https://elysiatools.com/en/samples/jwt-samples): Comprehensive JWT examples from basic token structure to advanced security implementations
- [Postman Collections - API Testing](https://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://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

## Related content

- [JSON Interchange and Format Translation Tools](https://elysiatools.com/en/hubs/json-convert): Compare JSON conversion tools for CSV, YAML, TOML, GraphQL, XML, Markdown, Excel, BSON, EDN, and related structured formats in one hub.
- [JSON Inspection, Diff, and Transformation Tools](https://elysiatools.com/en/hubs/json-utility): Compare JSON formatting, diffing, path inspection, schema validation, merging, transformation, and export tools in one hub for API and data workflows.
- [JSON Schema, Mock Data, and API Fixture Generators](https://elysiatools.com/en/hubs/json-generate): Curated tools for JSON schema generation, mock payload building, and API fixture preparation in one hub.
- [JSON Formatting, Diff, and Normalization Tools](https://elysiatools.com/en/hubs/json-format): Compare JSON formatting, diffing, log review, config comparison, and data-normalization tools in one hub for readable and reviewable JSON workflows.
