Test JSONPath expressions live
Filter, descend, and slice into JSON with the classic $.dot.path[*][?(@.cond)] syntax. Live preview as you type.
[ "Atomic Habits", "Deep Work", "Sapiens" ]
How to query JSON with JSONPath
JSONPath is an XPath-like syntax for JSON. Useful when you need a quick read-only query into a document — paths like $.store.books[*].title, descendants $..price, filters $..books[?(@.price<20)].
- 01
Paste JSON
Drop a document and start with
$(the root).Inputs parse through the native
JSON.parsereviver chain — strict RFC 8259. Any syntax error returns line and column for the exact offending byte.root: $RFC 8259JSON.parsestrictliveinput · raw.json · RFC 8259{"store":{"books":[{"title":"X"}]}}loaded · parsed RFC 8259RFC 8259 · ready - 02
Write a path
Drill in with
.field, expand with[*], descend recursively with.., slice with[1:3], filter with[?(@.cond)].$.field$..deep[?(@.x>1)]pathexpr$.store.books[*].title
valid - 03
Inspect matches
Each path can return multiple values — output is a JSON array.
Large documents stream through a
useMemowith stable hashing so options re-apply instantly — no full re-parse if only formatting changes.arraymatchesmemoisedinstantdiff-friendlymatches · rendered3 · ready["Atomic Habits","Deep Work","Sapiens"]
rendered · livediff-friendly - 04
Copy or download
Compare with JQ Playground for a richer query language.
Download is a
Blobwithapplication/json; copy uses the Async Clipboard API. Both round-trip identically to what the page rendered.copydownloadclipboardblob.jsonexport · copiedready · done✓ Copied ✓ Saved
shipped · ready to shipsuccess
Production-grade JSON, the right way
Stick to RFC 8259
Strict JSON has no NaN, Infinity, comments, or trailing commas. If you need those, look at JSON5 or JSON Repair.
Preserve key order for diffs
JavaScript preserves insertion order, but two parsers shouldn’t be assumed equal. Use Sort JSON Keys before diffing or hashing.
Big integers lose precision
JS numbers lose precision past 2^53−1. Transport large IDs as strings or use BigInt.
Escape inside HTML
When inlining JSON inside <script>, escape </ to <\/ so HTML parsing doesn’t close your tag early.
Validate at boundaries
Trust the wire as little as possible. Run incoming JSON through a schema (Zod / Pydantic) before it touches business logic.
Minify in production
Minify removes whitespace; gzip removes redundancy. Together they typically shrink JSON payloads 70–85% over the wire.
When to use JSONPath
Quick read-only queries where jq would be overkill.
API exploration
Probe deep into a response without writing a script. Output round-trips losslessly through JSON.parse + JSON.stringify, so the file you save is byte-identical to what you see. Streaming parsers, jq pipelines, and Postgres jsonb columns all accept the result without complaint.
10× faster to scanTest assertions
Many libraries (Postman, REST-assured) use JSONPath for response assertions. Pairs perfectly with sort-keys + diff for review-friendly fixtures in CI. Whitespace-only churn disappears and reviewers see real changes, which keeps PR comments focused on logic rather than indentation.
cleaner PR diffsk8s manifests
kubectl supports -o jsonpath=... for field selection.
OpenAPI / Swagger
Reference path objects with JSONPath expressions inline. Re-parses on every keystroke so syntax errors are caught at the exact character. Strict RFC 8259 — no trailing commas, no comments, no unquoted keys — keeps downstream parsers happy.
round-trip safeWebhook routing
Extract subset fields from a webhook for downstream consumers. Streams large documents without a server round-trip — privacy stays in the tab. Heavy parsing runs through useMemo so even 5 MB payloads keep the editor responsive.
schema-friendlyLog filtering
Pull a specific field from structured logs for further analysis. Output is byte-stable: same input plus same options always produces identical bytes, ideal for content-addressed caches and snapshot tests. Downloads ship with the application/json MIME so editors apply syntax highlighting.
production-readyFrequently asked questions
Something missing?
Tell us what you need. We ship the top requests every two weeks.