Logo JSON Parser Online

Test JSONPath Expressions Online

Paste your JSON into the input pane, enter a path expression in the field at the top (e.g. $.users[0].name), and click Extract. The matching value is returned as formatted JSON. Useful for quickly exploring API responses or config structures.

All JSON Tools

28 tools

Free, fast, runs in your browser. No login needed.

Made with ❤️ in India · © 2025 parsejsononline.com
INPUT
1
OUTPUT
1
✅ Ready
Characters: 0
Ctrl+Enter to run
What is this tool?

How to use

  1. Paste your JSON into the INPUT pane on the left.
  2. Enter your path expression in the text field — default is $.users[0].name.
  3. Click Extract or press Ctrl+Enter.
  4. The output shows the matched value as formatted JSON.
  5. Adjust the path and run again to navigate to different parts of the structure.

How it works

The tool evaluates your path expression as a JavaScript property access. It replaces the leading $ with data (where data is your parsed JSON), then runs the resulting expression via new Function(). $.users[0].name becomes data.users[0].name.

What works: dot notation ($.key), bracket notation ($.users[0]), chained access ($.config.db.host), array properties ($.items.length), and any valid JavaScript property access chain.

What does not work: the tool does not implement the full JSONPath specification. Wildcard selectors ($.users[*]), recursive descent ($..name), and filter expressions ($.users[?(@.active == true)]) are not valid JavaScript and will return a path error. For those operations, use a server-side JSONPath library (jsonpath-plus, jmespath) or the Filter JSON Array tool on this site.

JavaScript expressions. Because paths are evaluated as JavaScript, native array methods work: $.users.filter(u => u.active) returns only active users. This goes beyond JSONPath syntax but can be more expressive for one-off queries.

If the path throws a JavaScript error (property not found on undefined, invalid syntax), the tool returns a Path error: message with the engine's description.

FAQ

Does this support the full JSONPath specification?

No. The tool evaluates paths as JavaScript property access, not as a JSONPath library. Basic dot and bracket notation works. Wildcards ([*]), recursive descent (..), and filter expressions ([?(@.field)]) are not supported.

Why does $.users[*].name return an error?

[*] is JSONPath wildcard syntax, not valid JavaScript. The tool evaluates the path as JS, so it fails. To extract all names, use $.users.map(u => u.name) instead — JavaScript array methods are supported.

Can I use JavaScript array methods in the path?

Yes. Expressions like $.users.filter(u => u.active) or $.items.map(x => x.id) work because paths are evaluated as JavaScript. This is more flexible than strict JSONPath syntax for ad-hoc queries.

What does "Path error" mean?

The path expression threw a JavaScript error — usually accessing a property on undefined (the path goes deeper than your data) or a syntax error in the expression itself.

Is my data sent anywhere?

No. Both the JSON and the path expression are evaluated entirely in your browser. Nothing is transmitted.

What is the difference between JSONPath and JMESPath?

JSONPath uses $. prefix and dot/bracket notation borrowed from JavaScript. JMESPath is a separate query language with different syntax for filters and projections, used notably in the AWS CLI. This tool uses JavaScript-style paths only.

Related tools

Filter JSON ArrayFilter array items by key-value conditions. Flatten JSONFlatten nested JSON to dot-notation keys. JSON Tree ViewerExplore JSON structure visually before writing a path.