JSONata Playground
Write a JSONata expression to query and transform your JSON. Filter arrays, reshape objects, compute aggregates and build entirely new output — results update as you type. Everything runs locally in your browser; your JSON is never uploaded.
Query and transform JSON with JSONata
JSONata is a lightweight query and transformation language built specifically for JSON. Where JSONPath only selects values that already exist, JSONata can filter, sort, group, run functions and assemble entirely new object and array shapes — all in a concise expression. This playground evaluates your expression against the JSON you paste and updates the result as you type, so you can shape a payload interactively before wiring the expression into your code or an integration platform.
How to use it
- Paste your JSON into the input box (or load the sample).
- Write a JSONata expression in the field above.
- The transformed result appears on the right and updates live.
Expressions to try
users.name— project the name of every user.users[active=true].name— names of active users only.$count(users)— how many users there are.{ "names": users.name }— reshape into a new object.users^(name)— sort users by name.
When you would reach for it
Reshaping an API response to match a different schema, building a summary from raw records, or prototyping a transformation for a low-code platform (JSONata powers mapping in several of them). For simple value selection try the JSONPath tester; for command-line style filtering see the jq playground.
Privacy
The JSONata engine runs entirely in your browser and works offline once loaded. Your JSON and expressions are never uploaded or stored, so it is safe to work with real data.
Frequently asked questions
Is my JSON uploaded anywhere?
No. The JSONata engine runs entirely in your browser — your data and expressions never leave your device.
What can JSONata do that JSONPath cannot?
JSONPath only selects existing values. JSONata is a full query and transformation language: it can filter, sort, group, compute with functions like $sum and $count, and build brand-new object/array shapes.
Some quick examples?
users[active=true] filters, users.name projects a field, $sum(items.price) aggregates, and { "names": users.name } reshapes into a new object.
Why did my expression return nothing?
JSONata returns undefined when nothing matches. Check field names and array paths — matching is case-sensitive — and build the expression up one step at a time to see where it stops returning data.
Can it aggregate and group data?
Yes. Built-in functions such as $sum, $count, $average, $max and $min aggregate values, and you can combine them with filters and object construction to produce summary reports from raw arrays.