Pricing
Domains & email
Why HostKarle
About
Contact
See plans Log in

JSON path finder — click a value, get its path

Paste any JSON to see it as a tree. Click a key or value and copy its JSONPath in dot or bracket notation, or as ready-made JavaScript and PHP. Then test your own JSONPath expressions against the same data. Nothing leaves your browser.

Runs in your browser
Your data is never uploaded
Free, no sign-up
Load file
JSON tree
Try:

Everything happens in your browser with JavaScript. Nothing you paste is sent to HostKarle or anyone else, so it is safe for API responses, config files and other private data. Shortcut: Ctrl + Enter runs the tool.

JSONPath finder

How to find a JSON path

Counting brackets by eye in a 500-line API response is how off-by-one bugs happen. Let the JSON path finder count for you.

1

Paste the JSON

Paste a response from Postman, your browser's network tab or a log file, or load a .json file. Press Show tree.

2

Click the value you need

Open branches with the arrows and click a key or value. The path appears below the tree in dot, bracket, JavaScript and PHP form, with the value itself.

3

Test a JSONPath

Type an expression such as $..price and press Evaluate. Matches are listed and highlighted in the tree; click one to jump to it.

JSONPath syntax

JSONPath cheat sheet

These are the expressions the evaluator understands, shown against the sample data. They work the same way in most JSONPath libraries.

ExpressionMeansSample result
$The root of the documentThe whole object
$.store.bicycle.colorChild keys, dot notation"red"
$['store']['content-type']Child keys, bracket notation (any key)"application/json"
$.store.book[0]First array item (indexes start at 0)The first book
$.store.book[-1]Last array itemThe fourth book
$.store.book[*].authorA key from every itemAll four authors
$.store.*Every child of an objectbook, bicycle, content-type
$..priceA key at any depthAll five prices
$.store.book[0,2]Several itemsThe first and third books
$.store.book[1:3]A slice, end not includedThe second and third books
JSON path finder FAQs

Frequently asked questions

Something not working the way you expect? Message us on WhatsApp at +91 94343 44325. We are a hosting company, so we answer developer questions too.

How do I find the path of a value in JSON?

Paste the JSON and press Show tree. Click any key or value in the tree and the box underneath shows its path in four forms: JSONPath dot notation ($.store.book[0].title), JSONPath bracket notation ($['store']['book'][0]['title']), JavaScript and PHP. Press Copy next to the one you need.

What is JSONPath?

JSONPath is a small query language for JSON, like XPath for XML. $ is the root, .name or ['name'] picks a key, [0] picks an array item, [*] picks every item and ..name searches every level. It is used in API testing tools, Kubernetes, AWS Step Functions, MySQL JSON functions and many monitoring tools.

Which JSONPath expressions can I test here?

The common subset: $, .key, ['key'], ["key"], [n] and negative indexes like [-1], [*] and .*, the recursive ..key and ..*, lists like [0,2] or ['a','b'], and slices like [0:3]. Filter expressions such as [?(@.price < 10)] are not supported.

What is the difference between dot and bracket notation?

They point to the same place. Dot notation is shorter and easier to read; bracket notation works for every key, including keys with spaces, dashes, dots or that start with a digit. The tool automatically switches to brackets for such keys even in the dot form, for example $.headers['content-type'].

Is my JSON uploaded to find the paths?

No. The tree and the JSONPath evaluator run in your browser. Nothing is sent to HostKarle, so you can safely paste API responses that contain tokens or customer data.

Does it work with large JSON files?

Yes. Deep branches open only when you click them, so even big files stay fast. The tree draws up to 6,000 nodes; for anything beyond that, type a JSONPath and click a result to jump straight to it.

How do I use the path in PHP or JavaScript?

Copy the JavaScript line (for example data.store.book[0].title) after const data = JSON.parse(text), or the PHP line (for example $data['store']['book'][0]['title']) after $data = json_decode($json, true).

Free developer tools

More JSON and XML tools

All of them run in your browser, need no sign-up and work on large files. Bookmark the one you use most.

PHP hosting for developers, from ₹99 a month

Pick the PHP version per domain up to PHP 8.3, with MySQL, phpMyAdmin, cron jobs and free SSL in DirectAdmin, on SSD servers. Host Laravel, CodeIgniter or plain PHP APIs. Renews at the same price.

Also on HostKarle: hosting checker · WHOIS lookup · bulk domain search · shared hosting plans

Chat with us