{{ summaryTitle }}
{{ summaryValue }}

{{ summaryLine }}

Profile{{ profileLabel }} Shown{{ computation.ok ? computation.values.displayed_matches : '—' }} Depth{{ computation.ok ? computation.values.maximum_depth : '—' }}
{{ summaryAnnouncement }}
JSONPath test inputs
Paste, drop, or browse one JSON value up to 2 MiB.
{{ sourceMeta }}
{{ sourceActionHint }}
Try $.store.book[*].title, $..price, or $.store.book[?(@.price < 10)].title.
Filters accept current-node existence checks or one literal comparison; arbitrary JavaScript is never evaluated.
Use path pairs for review, pointers for downstream pointer workflows, or a JSON array for structured handoff.
The default displays up to 500 matches.
matches
Choose 0 to 8 spaces.
spaces
Library dialects vary; rerun the expression in the target project before relying on it.
{{ textExportAnnouncement }}
{{ computation.values.primary_output || 'No nodes matched this expression.' }}
{{ ledgerExportAnnouncement }}
#PathPointerTypeDepthPreviewCopy
{{ row.index }}{{ row.path }}{{ row.pointer || '/' }}{{ row.type }}{{ row.depth }}{{ row.preview }}
{{ chartExportAnnouncement }}
{{ syntaxExportAnnouncement }}
SelectorMeaningExampleCurrent supportCopy
{{ row.selector }}{{ row.meaning }}{{ row.example }}{{ row.support }}
{{ codeExportAnnouncement }}
{{ computation.values.code_example }}

Introduction:

A missing JSONPath result is not automatically an error. The expression may be valid and the selected branch may simply be absent, an array index may be outside the current array, or no item may satisfy a filter. Useful testing keeps three states separate: invalid JSON, invalid selector syntax, and a valid selector that returns an empty nodelist.

JSONPath selects values from a JSON tree. Objects contribute named children, arrays contribute indexed children, and the root identifier $ represents the whole value. Each segment takes the nodes selected so far and produces the input for the next segment. The final answer can contain one node, many nodes, or none.

Direct paths are easiest to review. An expression such as $.order.customer.id states one precise route, while $..id scans every descendant for the same member name. Recursive descent is useful for discovery but can silently include identifiers from unrelated branches. Wildcards and filters create the same tradeoff between reach and precision.

Common JSONPath tasks and review risks
Question Typical shape Main review risk
Read one known field $.order.status The member may be optional or may change type.
Read every array item $.orders[*].id An empty array is different from a missing orders member.
Find matching records $.orders[?(@.total >= 100)] Filter syntax and comparison behavior vary between libraries.
Discover nested fields $..price Unrelated branches can match the same member name.

Paths and values answer different review questions. A value shows what was selected; its path shows where it came from. JSON Pointer adds a separate slash-based location format for systems that consume pointer syntax. Keeping all three together is especially important when duplicate values occur at different depths.

JSONPath is not schema validation. A selector can prove that the current payload contains a matching node, but it does not prove that future payloads will contain the same member, type, range, or array shape. Production use should be retested in the actual JSONPath library because supported syntax and result ordering can differ.

How to Use This Tool:

Use a representative JSON value, then verify the matched paths and types before carrying the selector into code.

  1. Paste one JSON value into JSON source, drop a file, or browse for one JSON or text file up to 2 MiB.
  2. Enter a JSONPath expression beginning with $. Start with the narrowest direct route you can explain, then add wildcards, recursive descent, slices, unions, or filters only when the payload requires them.
  3. Choose Portable subset with safe filters for bounded existence or literal-comparison filters. Choose Basic selectors without filters when filter expressions should be rejected.
  4. Select the matched output format. Values are convenient for copying, path-value pairs preserve context, paths and JSON Pointers preserve locations, and JSON array output keeps matched values structured.
  5. Set the Display limit from 1 to 5,000 and JSON indentation from 0 to 8 spaces. The total match count can exceed the displayed rows, so check the truncation cue before assuming the visible list is complete.
  6. Review the match ledger for path, pointer, type, depth, and preview. If there are no matches, distinguish that valid result from the explicit JSON or expression error shown for malformed input.

Interpreting Results:

Matched means one or more nodes were selected. No matches means evaluation completed successfully with an empty nodelist. A parse or expression issue is different: no result should be trusted until the displayed error is corrected.

  • Compare Total matches with Displayed matches before copying a broad result.
  • Inspect Type when downstream code expects only strings, numbers, objects, or another single JSON kind.
  • Inspect Depth and exact paths after recursive descent; unexpected depth often reveals an unintended branch.
  • Rerun the payload and expression in the target library before relying on generated starter code.

Technical Details:

JSONPath evaluation starts with a nodelist containing only the root node. Every selector segment is applied to the current nodelist, and the resulting nodes become the next nodelist. Object member names and array positions are locations in the tree; selected member values and array values are the nodes returned to the reader.

Transformation Core:

Bounded JSONPath evaluation stages
Stage Rule Boundary
Parse source The input must parse as one JSON value before a selector runs. UTF-8 source is limited to 2 MiB.
Tokenize expression The expression must begin with $; dot, bracket, recursive, slice, union, and permitted filter segments are recognized in order. Expression length is limited to 4,096 characters and 256 selector segments.
Evaluate segments Each segment selects children or descendants from the current nodelist. Missing children and out-of-range indexes contribute no node. Evaluation stops if more than 50,000 nodes are selected.
Project evidence Displayed matches receive a path, JSON Pointer, value type, depth, and compact preview. Only the first 1 to 5,000 matches are displayed; output text is capped at 16 MiB.

Selector Support Map:

Supported JSONPath selector behavior
Selector Meaning Exact behavior here
.key, ['key'] Select a named object child. Quoted form handles names that dot notation cannot represent.
[n] Select an array position. Indexes are zero-based; negative indexes count back from the end.
[*], ..* Select all direct children or all descendants. Object children follow the parsed member order; broad results can hit the 50,000-node ceiling.
[start:end:step] Select an array slice. The end is exclusive; negative positions and negative nonzero steps are supported.
[a,b] Select a union of indexes or quoted member names. Each item is applied in written order; unsupported union items are rejected.
[?(@.price < 10)] Filter direct children. The portable profile allows current-node existence checks or one literal comparison using ==, !=, <, <=, >, or >=. Arbitrary JavaScript and logical expression chains are not evaluated.

Relational filters compare only values of the same primitive type. Ordering operators apply to strings or numbers; a missing path, mismatched type, object, or array does not match. Filter bodies are limited to 512 characters. The basic profile rejects all filters rather than silently changing their meaning.

JSON Pointer output starts from an empty root pointer and adds slash-separated reference tokens. A literal tilde in a member name becomes ~0, and a literal slash becomes ~1. The root itself is displayed as / in pointer-only output for readability.

The generated JavaScript, Python, Java, Go, and PHP snippets are starter patterns for different libraries. They do not certify that those libraries support this exact filter grammar, result order, negative-index behavior, or path formatting.

Privacy Notes:

Pasted and selected JSON is parsed and queried in the browser. Nothing needs to be sent to a matching service, but copied output, downloaded ledgers, code snippets, screenshots, and generated paths can expose values or identifiers from the source. Use redacted fixtures for tokens, customer records, and production payloads.

Worked Examples:

Select inexpensive titles

Against the included store sample, $.store.book[?(@.price < 10)].title returns two title strings under the portable profile. Their ledger paths identify the first and third book records, which is stronger evidence than copying the two titles without locations.

Separate an absent branch from bad JSON

$.store.magazine[*].title returns No matches because the sample has no magazine member. Removing a comma from the sample instead produces a JSON parse issue, so the selector is never evaluated.