JSON Parser

JSONPath Online Tester, Evaluator & Parser

This free JSONPath (JSON Path) tester runs your expression against any JSON document and shows every match instantly — no signup, and nothing leaves your browser. Paste your JSON, type a path such as $.store.books[*].title, and use it as a JSONPath evaluator, parser, or expression builder: click any example chip to start from a working query and edit it from there. If your JSON is malformed, run it through the JSON repair tool first.

What is JSONPath?

JSONPath is a query language for JSON, in the same way XPath is for XML. Instead of looping through nested objects and arrays in code, you write a short path that describes the values you want, and the evaluator returns every match. It is used in API testing tools, log pipelines, Kubernetes, and anywhere you need to pull a few fields out of a large response. For a printable reference, see the JSONPath cheatsheet: 20 expressions every developer needs.

JSONPath syntax reference

OperatorWhat it doesExample
$The root of the JSON document. Every JSONPath expression starts here.$
.keyChild property (dot notation).$.store.name
['key']Child property (bracket notation). Use it for keys with spaces or dashes.$.store['location'].city
[n]Array element by index, starting at 0.$.store.books[0].title
[-n]Array element counted from the end.$.store.books[-1].title
[*] or .*Wildcard — every element of an array or every value of an object.$.store.books[*].author
..Recursive descent — search at any depth.$..price
[start:end]Array slice (end is exclusive; an optional :step is supported).$.store.books[0:2].title
[a,b]Union — several indices at once.$.store.books[0,2].title
[?(@.x op v)]Filter — keep items where the condition is true. Operators: == != < <= > >=, or just @.x to test that a field exists.$.store.books[?(@.price < 35)].title

JSON Path examples: JSONPath expressions on bookstore data

These all run against the sample document loaded in the tester above — a store with four books, each with a title, author, price and an inStock flag.

  • $.store.name

    A single value by path. Returns: "Acme Books"

  • $.store.books[-1].title

    The last book in the array. Returns: "Refactoring"

  • $.store.books[*].author

    One field from every item. Returns: "Hunt & Thomas", "Robert Martin", "GoF", "Fowler"

  • $..price

    Every price anywhere in the document. Returns: 39.95, 29.99, 44.95, 34.99

  • $.store.books[?(@.price < 35)].title

    Filter, then pick a field. Returns: "Clean Code", "Refactoring"

  • $.store.books[?(@.inStock == true)].title

    Filter on a boolean. Returns: "The Pragmatic Programmer", "Clean Code", "Refactoring"

  • $.store.books[0:2].title

    The first two items (a slice). Returns: "The Pragmatic Programmer", "Clean Code"

How to build a JSONPath expression

  1. Start at the root with $ and walk down with dots: $.store.books.
  2. Add [*] to fan out across an array, or [0] / [-1] to pick one item.
  3. Narrow the list with a filter such as [?(@.inStock == true)].
  4. End with the field you want back: .title.
  5. Not sure where a value lives? Use $..fieldName to find it at any depth, then tighten the path.

Common JSONPath mistakes

  • Forgetting the root. Expressions start with $; store.name alone is not a valid path.
  • Dots in awkward keys. Use bracket notation — $['first-name'] — for keys containing spaces or dashes.
  • Quoting values in filters. Strings need quotes (@.author == "Fowler"); numbers and booleans do not.
  • Expecting one result. JSONPath always returns a list of matches, even when only one value matches.
  • Overusing ... Recursive descent is convenient but can match unintended fields in large documents.

Related tools

Flatten nested data with the JSON flatten tool, compare two payloads with JSON Diff, describe your data with the JSON Schema generator, or format and explore it in the JSON parser.

Handles JSON files up to 20MB smoothly