jq Playground
Paste or drop your data here, or open a file.
New to Bracely?
Everything stays in your browser.
Output appears here
Paste or open your data in the input box. It never leaves your browser.
jq Playground
Try jq filters against your own JSON without installing anything. The output updates as you type, so you can build a filter step by step and copy it into your scripts.
Example: revenue by city from a list of orders
Keep the paid orders, group them by the customer's city, and build one summary object per city with the count and the sum of the totals. Each step of the pipe feeds the next, as in the jq command line:
Input
{
"orders": [
{
"id": "ORD-1",
"status": "paid",
"total": 2499,
"customer": {
"city": "Pune"
}
},
{
"id": "ORD-2",
"status": "refunded",
"total": 799,
"customer": {
"city": "Delhi"
}
},
{
"id": "ORD-3",
"status": "paid",
"total": 12999,
"customer": {
"city": "Pune"
}
},
{
"id": "ORD-4",
"status": "paid",
"total": 1598,
"customer": {
"city": "Delhi"
}
}
]
}Filter
.orders | map(select(.status == "paid")) | group_by(.customer.city) | map({city: .[0].customer.city, orders: length, revenue: (map(.total) | add)})Output
[
{
"city": "Delhi",
"orders": 1,
"revenue": 1598
},
{
"city": "Pune",
"orders": 2,
"revenue": 15498
}
]
How do I use the jq Playground?
- Paste JSON or open a file.
- Type a jq filter, for example .items[] | select(.qty > 1).
- Choose pretty, compact (-c) or raw (-r) output and copy the result.
What does the jq Playground do?
- Common jq built-ins: select, map, reduce, to_entries, group_by, paths and more
- Pretty, compact and raw output like the command line
- JMESPath, JSONPath and SQL tools for other ways to query JSON
- Runs in your browser: your data never leaves your device
When to use the jq Playground
jq is the command-line tool for slicing, filtering and reshaping JSON, and the best way to learn it or debug a filter is to see the result change as you type. Paste the data once, then build the filter step by step, as in the example: select the paid orders, group them, then shape the summary.
Bracely runs its own jq engine in your browser, so nothing is uploaded and there's nothing to install. It covers the jq you use every day: pipes, select, map, sort_by, group_by, to_entries, reduce, |= updates, del, string interpolation like "total: \(add)", your own def functions and more than 120 builtins. Output can be pretty, compact like jq -c, or raw strings like jq -r for use in shell scripts.
Frequently asked questions
- Will my filter work the same in the jq command line?
- The common filters behave the same, so a filter that works here works in jq. Command-line options that read files or variables, like --arg and --slurpfile, aren't part of the playground.
- How do I get plain text out, without quotes?
- Set Output to Raw strings (-r). Each string result is printed on its own line without quotes, ready to paste into a script or a spreadsheet.
- Is this the real jq?
- It is a jq implementation written for the browser that supports the filters people use most. Very rare built-ins may be missing.
- Can I query JSON with SQL instead?
- Yes. The SQL tool runs SELECT queries against arrays in your JSON.
- Does it work offline?
- Yes, once the page has loaded.
More JSON tools
Bracely has 108 JSON tools in one page. Related ones:
- JSONPath Tester
- JMESPath tester
- Query JSON with SQL
- JSON Pointer
- Search JSON
- JSON find and replace
- Ask AI
- Regex tester
- Large file viewer
- JSON table viewer
- JSON visualizer
- Merge JSON
- Flatten JSON
- JSON Formatter
- JSON Validator
- JSON Viewer
- JSON Repair
- JSON Diff
- JSON to YAML
- JSON to CSV
Runs entirely in your browser. Nothing you paste is uploaded. Made by Saurabh Pagrut · About · Privacy policy
Last updated · Version 6.7 · Changelog
Saurabh Pagrut on GitHub · LinkedIn · X · YouTube · Instagram