What is JSONPath?

Last updated: February 2026

JSONPath is a query language for pulling specific values out of JSON documents. You write a path like $.store.books[0].title and it returns the matching data. It works a lot like XPath does for XML. If you've ever had to dig through a deeply nested API response looking for one field, that's what JSONPath is for.

JSONPath syntax reference

Expression Description Example
$ Root object or element $ returns the entire JSON
.key Child operator (dot notation) $.library selects the library field
['key'] Child operator (bracket notation) $['library'] same as dot notation
* Wildcard — matches any field or index $.books[*].title all book titles
.. Recursive descent — searches all levels $..author every author in the tree
?() Filter expression $.books[?(@.available==true)]
[start:end] Array slice $.books[0:2] first two books

Common JSONPath examples

How to use this tool

  1. Paste your JSON into the left panel. Or click "Simple" / "Complex" to load a sample.
  2. Hit "Parse JSON." You'll get a color-coded tree view.
  3. Click any value in the tree and its JSONPath appears automatically. You can also just type a path by hand.
  4. Click "Evaluate" to run the path. Matching values get highlighted in the tree.

Frequently asked questions

What is JSONPath?

It's a way to grab specific pieces of data from a JSON document without writing a parser. You write a path expression, and it returns whatever matches. $.users[0].name gives you the first user's name.

What is the difference between dot notation and bracket notation?

Dot notation ($.store.name) is shorter and easier to read. Bracket notation ($['store']['name']) does the same thing, but you need it when keys have spaces, special characters, or start with a number.

How do I filter arrays in JSONPath?

With the ?() filter syntax. $.books[?(@.price < 20)] gives you every book priced under 20. The @ refers to whatever element is being checked.

Is JSONPath the same as XPath?

No. JSONPath borrows ideas from XPath but only works with JSON. XPath is more powerful (it has axes, predicates, built-in functions), but JSONPath is simpler because JSON itself is simpler than XML.

Is this tool free to use?

Yes, completely free, no signup. Everything runs in your browser. Your JSON never leaves your machine.

Does this tool work with large JSON files?

Yes. It uses lazy loading so it won't freeze on big files. You can also limit how many array items or object keys get rendered at once in Settings if things get slow.