JSON

JSONPath Tester

Test RFC 9535 JSONPath expressions against strict JSON documents.

JSONPath Tester workspace

Input

Preparing tool…

This tool is not available yet.

Result

Preparing tool…


  
  

    How it works

    Documentation

    About JSONPath Tester

    Test JSONPath expressions against strict JSON documents and inspect every matched value with its RFC 9535 normalized path. SyntaxDock follows RFC 9535.

    How to use

    Enter a JSONPath expression above the JSON document, then choose Test JSONPath. You can also load an example. The result is always a JSON array of path and value pairs.

    JSONPath expression syntax

    A JSONPath expression starts at the root with $. RFC 9535 permits whitespace where its grammar allows it, including line breaks, so the expression editor supports more than one line.

    RFC 9535

    This tool implements RFC 9535 JSONPath, not a legacy compatibility dialect. The JSON query argument may be any valid JSON value: an object, array, string, number, boolean, or null.

    Child and descendant selectors

    Use child selectors such as $.store.book, $['store']['book'], and $.store.book[*].title. Use the descendant segment $..price to find matching descendants.

    Array selectors and slices

    Array indexes select one element, such as $.items[0]. Slices select a range or step, such as $.items[1:5:2]. A comma-separated selector list, such as $['first','second'], can select multiple children.

    Filters

    Filters use RFC 9535 expressions. For example, $.store.book[?@.price < 10].title selects titles of books priced below ten. Filters are interpreted as JSONPath expressions, never as JavaScript.

    Standard functions

    RFC 9535 standard functions are available where their argument and result types apply: length() measures a value, count() counts nodes, match() tests a complete regular-expression match, search() tests a regular-expression search, and value() converts a singular nodelist to its value.

    Result paths and values

    Each result includes the library-provided RFC 9535 normalized path, such as $['store']['book'][0]['title'], and the JSON value at that path. Matches remain in JSONPath nodelist order; repeated selections remain repeated.

    Empty results

    A valid expression can match no nodes. This is a successful query: the workspace shows Matches: 0 and [], not an error.

    Legacy JSONPath syntax

    Some older JSONPath tools accept non-standard syntax or JavaScript-based filters. For example, parentheses around a JavaScript filter are not the SyntaxDock form. If another tool accepts an expression that this tester rejects, check it against RFC 9535.

    Privacy

    Your JSON document, JSONPath expression, matched values, and result paths are processed locally in this browser. SyntaxDock does not upload or store them.

    Limits

    JSON input is limited to 2 MiB UTF-8, expressions to 8 KiB UTF-8, and rendered results to 1,000 matches. When more nodes match, the total and displayed counts make truncation explicit.

    FAQ

    Why is my JSON rejected? Input is strict JSON: comments and trailing commas are not accepted. Why is a query rejected? Use RFC 9535 syntax rather than an implementation-specific extension.

    For examples and workflow details, read the JSONPath Syntax Guide.