JSONPath Evaluator — Query JSON Data Online

Query and extract data from JSON documents with JSONPath expressions. Enter JSON and run JSONPath queries to filter, map, or extract nested values. Useful for developers, testers, and analysts working with complex JSON structures in APIs, logs, and data pipelines.

InputNo file
Output

What is JSONPath?

JSONPath is a query language for JSON. It lets you address and extract specific parts of a JSON document using a concise syntax (think XPath but for JSON). This evaluator executes your expressions entirely in the browser—no uploads—so you can safely explore API payloads, logs, and large nested objects.

Quick syntax reference

  • $ — root object (start every expression here).
  • ./['prop'] — child property (dot or bracket notation).
  • [*] — wildcard for “all items” in an array or “all properties”.
  • .. — recursive descent to match nested occurrences ($..name).
  • [0], [1,3] — index or union of indices.
  • [start:end:step] — array slicing (library-dependent; keep it simple when possible).
  • [?(@.price < 10)] — filter by predicate using the current item @.
  • =~ /regex/i — regex match inside filters (e.g., names starting with “A”).

Common examples

// All project names
$.projects[*].name

// Find projects with id >= 100
$.projects[?(@.id >= 100)]

// Grab every "price" anywhere in the tree
$..price

// Case-insensitive match on name
$.projects[?(@.name =~ /alpha/i)].name

How to build a JSONPath step by step

  1. Start from the $ root and drill down using dot/bracket notation.
  2. Switch to [*] when you hit arrays and want “all items”.
  3. Add a [?()] filter to keep only elements that match your condition.
  4. Finish with the field you need (e.g., .id, .name) or return the full object.

Tips & pitfalls

  • Properties with dots/spaces: use bracket notation: $['a.b'], $['display name'].
  • No results? Ensure your path starts with $ and matches array vs object levels correctly.
  • Filters: keep predicates simple (e.g., @.flag === true, @.count > 0).
  • Performance: Target a narrower subtree (e.g., $.items[*]) instead of using $.. across the entire document.
  • Normalization: Use Beautify first to fix commas/quotes and to surface invalid JSON early.

Use cases

  • Spot-checking API responses without writing code.
  • Extracting columns from nested JSON in ETL/ELT pipelines.
  • Debugging logs and event payloads by filtering to relevant fields.

Privacy & performance

Everything runs locally in your browser. That means confidential payloads stay private and results appear instantly, limited only by your device and document size.

Need to reformat or validate your JSON before querying? Try the Validator, Converter, and Diff tools.

FAQ

What is JSONPath?

JSONPath is a query language for JSON that lets you select and extract values from nested objects and arrays-similar to XPath for XML.

What does a basic JSONPath look like?

Start at the root with $. Example: $.projects[*].name returns all name values under the projects array.

Which operators are supported?

Common operators include dot/bracket notation (.$.prop or $['prop']), wildcards ([*]), recursive descent ($..name), filters ([?()]), unions ([0,2]), and slices ([1:4]).

How do filters work?

Use a predicate inside [?()]. Example: $.items[?(@.price < 10 && @.inStock === true)] selects items under $ where price < 10 and inStock is true.

Can I use regular expressions?

Yes-use =~ in filters. Example: $.users[?(@.name =~ /^(al|be)/i)].name matches names beginning with "al" or "be" (case-insensitive).

How do I select multiple indices or fields?

Use a union. Example: $.arr[0,2,5] picks specific indices; $['first','last'] selects multiple properties from an object.

How do I slice arrays?

Use [start:end:step]. Example: $.arr[1:5] gets indices 1-4; $.arr[::2] gets every second element.

What about properties with dots or spaces in their names?

Use bracket notation with quotes: $['a.b'] or $['display name'].

Why do I get an empty result?

Common causes: missing leading $; mixing up object vs array levels; typos in field names; filters that never match. Beautify your JSON first and verify each segment of the path.

How can I return the full object instead of just a field?

Target the object node in your path. For example, $.users[?(@.role === 'admin')] returns the matching user objects; appending .name would return only names.

Any performance tips for large documents?

Limit the search space (e.g., $.items[*] instead of $..*), avoid overly broad recursive descent ($..), and keep filters simple to reduce traversal cost.

How does JSONPath differ from JMESPath or XPath?

All are query languages, but syntax and features differ. This tool uses JSONPath semantics (e.g., $, .., [?()]) rather than JMESPath or XPath.

Can I test expressions before using them in code?

Yes-paste your JSON, try a JSONPath, and iterate. When satisfied, reuse the same expression in your scripts, ETL jobs, or API clients.

Is my data uploaded to a server?

No. All tools run locally in your browser; your data isn't sent to any server.

Can I use the tool offline?

After the page loads once, most browsers will allow basic offline usage because processing is entirely client-side.

Can I beautify JSON?

Yes - use the Beautify actions in each tool where applicable.

Do you keep my files?

No. All tools run locally in your browser; data is not uploaded to any server.

Is there a size limit?

Large inputs are limited by your browser memory; for most cases typical files work fine.

Is it free?

Yes, All tools are 100% free and no sign-up required.