Skip to content
MyJson

JSON Query — JSONPath & JMESPath Online

Pull out exactly what you need with JSONPath or JMESPath.

Input

Output

1 line
Runs entirely on your device

About Query JSON

A JSON query lets you pull specific values out of a large document without scrolling through it. Write a JSONPath or JMESPath expression such as $.order.items[*].sku and MyJson returns only the matching values, or the paths they were found at.

Queries run in your browser against the document you already have open, so you can test an expression before using it in code, a log pipeline or an API gateway.

How to use it

  1. 1Paste your JSONAdd the document you want to search to the input pane, or keep the one you were formatting.
  2. 2Pick a languageChoose JSONPath (RFC 9535) or JMESPath. The Examples menu offers common expressions for each, and the two keep separate expressions so you can compare them.
  3. 3Type a query and run itResults appear as you type. Press Ctrl+Enter to run explicitly on large documents.
  4. 4Use the resultCopy or download the matches, or press Use result to query them again and narrow further.

Features

  • JSONPath with filters, wildcards and recursive descent
  • JMESPath with projections, functions and multiselect
  • Switch between the matched values and the paths they came from
  • Example expressions for the document you pasted
  • Send results back to the input
  • Runs locally on documents up to 50 MB

When to use it

  • Pulling one field out of a large API response
  • Testing a JSONPath before using it in a gateway or test suite
  • Filtering an array of records by a condition
  • Checking what a JMESPath expression returns in an AWS CLI --query flag

Frequently asked questions

What is the difference between JSONPath and JMESPath?

Both select values from JSON. JSONPath uses $ and bracket filters such as $.items[?(@.price > 50)] and is common in test tools and gateways. JMESPath uses a function-based syntax such as items[?price > `50`].sku and is used by the AWS CLI and Azure CLI.

Is jq supported?

Not yet. jq needs a large WebAssembly runtime, so it is planned as an optional download once it fits the site performance budget.

Does my data leave the browser?

No. Queries run in a background thread inside the page. Nothing is sent to a server.

Related tools

Looking to learn more? Browse our JSON guides and tutorials.