JSON Path Tester

If you use Codebeautify regularly, registering for an account can be useful for some reasons.

Registration only takes a minute and is of course perfectly free. We are also planning on adding more features to user accounts in the future, such as more advanced comparison options. Be sure to let us know if you have any feature suggestions using the Feedback link on the left side.


We are moving email/password login to another page. Mean while please use google or facebook login. Sorry for inconvenience.

JSON Input

Option 1: Copy-paste your JSON string hereSample
Option 2: Or Load your JSON file

JSON Path Expression

Result Full Screen
JSONPath Usage
$ the root object/element
@ the current object/element
. or [] child operator
.. recursive descent. JSONPath borrows this syntax from E4X.
* wildcard. All objects/elements regardless their names.
[] subscript operator. XPath uses it to iterate over element collections and for predicates. In Javascript and JSON it is the native array operator.
?() applies a filter (script) expression.
() script expression, using the underlying script engine.


1. Select the document node $.*
2. Select the 'employees' element $.employees
3. Select all 'employee' elements that are direct children of the 'employees' element. $.employees.employee
4. Select all 'id' elements regardless of their positions in the document. $.employees.employee['*'].id
5. Select the 'id' attributes of the 'employee' elements with their positions in the document. $.employees.employee[1].id