Data ToolsA little help for every day

Search by name or task, such as JSON or percentage.

Data Tools

JSON Path Extractor and JSONPath Tester

Paste JSON and a path such as store.books[*].title or $..price to pull out values. Supports wildcards, negative indexes, slices and [?(@.price < 10)] filters.

View all tools
ResultUpdates as you type
[
  "Dune",
  "Emma",
  "Neuromancer"
]

3 matches found.

How to use JSON Path Extractor and JSONPath Tester

Paste JSON on the left and type a path such as store.books[0].title; matches update as you type. Choose plain text, JSON, one value per line or a table of paths and values, then press Copy result.

  1. Paste your JSONPaste an API response or file into JSON data. Syntax errors are reported with the line and column.
  2. Type a pathEnter a path such as store.books[*].title or $..price. The leading $ is optional and keys are case-sensitive.
  3. Choose the output and copyPick Automatic, Always JSON, One value per line or Table of paths and values, then press Copy result.

Path syntax with worked examples

Using the bookshop sample, store.books[*].title returns ["Dune", "Emma", "Neuromancer"] and store.books[-1].title returns Neuromancer, the last book. A double dot searches at any depth, so $..price finds 9.99, 7.5 and 12. Slices work like Python: store.books[0:2] gives the first two books, and ['title','price'] picks several keys at once. Indexes start at 0, and keys containing dots or spaces go in brackets, such as ['first name']. When a single string matches, Automatic output prints it without quotes, ready to paste; Table of paths and values shows where each match sits, such as $.store.books[2].price.

Filter expressions and empty results

Filters go inside [?( )], with @ standing for the current item. You can compare with ==, !=, <, <=, > and >=, match a regular expression with =~ /pattern/i, and combine conditions with && and ||. For example $.store.books[?(@.price < 10)].title returns Dune and Emma, and [?(@.isbn)] keeps only items with an isbn value. Comparisons with < or > only match values of the same type, so a price stored as the string "9.99" will not pass @.price < 10. If nothing matches, the result names the last part of the path that did exist and lists its keys, or says it is an array to index with [0] or [*].

Accuracy and data handling

Keep the original data and spot-check fields, types and delimiters before using an important conversion. The calculation runs in your current browser; the tool code does not send the input to a processing API.

FAQ

How do I get an item from a JSON array?

Use square brackets with a zero-based index, such as data.items[2].name. [-1] gives the last item, [*] every item and [0:3] the first three.

Why does my JSON path return nothing?

Usually a key's capitalisation differs, an index is out of range, or an array is being read like an object. The result shows the keys available at the last matching point; invalid JSON is reported with its line and column.

Can I extract several fields at once?

Yes. Use [*] to take the same field from every array item, or list keys in brackets such as ['name','age']. Multiple matches are returned together as a JSON array, or one per line if you choose that output.

Does it support every JSONPath feature?

It covers the common syntax: $, dot and bracket notation, .., *, negative indexes, slices and ?() filters. Script expressions and functions such as length() are not supported, so a path written for another library may need simplifying.

More Data Tools

Related tools