JSONPath Query

Query JSON with JSONPath.

Runs locally in your browser by default; no upload.

ToolHub ProRemove ads and unlock one-click file export on text-output tools below (image tool keeps its own download).

Unlock Pro on this tool

Batch path queries (one JSONPath per line) · One-click export download

Get Pro →
JSONPath
Requires Pro. See pricing
JSON
Output

You may also need

About

Run JSONPath queries to extract values from JSON (e.g. $.data.items[*].id). Ideal for debugging APIs, pulling fields from nested responses, and writing quick data checks without code. Runs locally in your browser.

Use cases

  • Extract IDs from an API response to compare with database records.
  • Pull nested values to create a smaller sample payload for bug reports.
  • Validate that a field exists across a list of items.

Common pitfalls

  • Different JSONPath implementations support different filter syntaxes; if a filter fails, try simplifying.
  • Paths are case-sensitive; a wrong key casing often yields empty results.

Examples

Input

json={"a":{"b":[{"id":1},{"id":2}]}}
path=$.a.b[*].id

Output

[1,2]

FAQ

Why is the result empty?

Verify the JSON structure first, then simplify the path step-by-step. Start with $ and add segments gradually.

Is JSONPath standardized?

Not fully. There are variations across implementations. Common syntax ($.a.b, $..id, [*]) works in most cases.

How do I select all items in an array?

Use [*], e.g. $.items[*].id.

How do I debug a complex path?

Try evaluating intermediate paths (e.g. $.data, then $.data.items) to confirm each level matches what you expect.

Limitations

  • JSONPath has dialect differences across libraries; syntax may vary slightly.
  • Complex filters can be slow on very large JSON inputs.

Recommended

Affiliate slots. Configure real links via environment variables.

No recommendations configured.