This playground runs a jq subset in your browser. It is not the full jq command-line tool.
Supported: field access, pipes, map, select, sort_by, group_by, keys, length, and object construction.
Not supported: reduce, try, foreach, recursive descent (..), and custom functions.
Enter JSON and a jq expression to see results
Supported jq-subset operations
Data Access
.field- Field access.[n]- Array index.[]- Iterate array/object.[n:m]- Array slice.a.b- Nested field access
Array Operations
map()- Transform each itemselect()- Filter by conditionsort / sort_by()- Sort arrayfirst / last- Get first/last itemflatten- Flatten nested arrays
Aggregation
length- Get lengthadd- Sum/concatenatemin / max- Find min/maxunique- Remove duplicatesgroup_by()- Group by field
Object & Type
keys / values- Get keys/valuestype- Get data typeto_entries- Object to entrieshas() / contains()- Check existencedel()- Delete field
How to Use the JQ Playground
- 1
Paste or load your JSON data
Paste raw JSON into the input panel or click Load Example to start with sample data. You can also drag and drop a.json file directly into the editor. The playground accepts any valid JSON structure including objects, arrays, and nested data. - 2
Write a jq-subset expression
Type a supported filter in the expression field at the top. Start with simple accessors like .name or .users[] and build pipelines such as .items | map(select(.price > 10)) | sort_by(.name). reduce, try, and foreach are not supported. Use the cheat sheet for the subset this page runs. - 3
Review the output
Results appear instantly in the output panel as you type. The playground highlights syntax errors and shows formatted JSON output. If your expression returns multiple values, each result is displayed on its own line for easy inspection. - 4
Copy or download the result
Click Copy to place the output on your clipboard, or use Download JSON to save the transformed data as a file. Your query history is preserved so you can revisit and refine previous expressions without retyping them.
Common Use Cases
Filtering API Responses
Transforming Log Files
Preparing Data for Visualization
Learning and Prototyping jq Queries
Why use our JQ Playground?
The JQ Playground is a browser-based environment for testing a jq subset against live JSON data. jq is a command-line JSON processor often called "sed for JSON". This page does not run full jq. It supports field access, pipes, map, select, sort_by, and group_by. It does not run reduce, try, or foreach.
Use it to extract fields from a REST API response, reshape a dataset for a JSON to Chart visualization, or flatten objects before a JSON to CSV export. Built-in examples cover the supported subset. For full jq, install the jq command-line tool.
All processing runs in your browser. Pair it with the JSON Formatter, the JSON Path Finder, or the JSON Visualizer.
How It Compares
JSONPath selects nodes from a JSON document. Full jq can also transform and aggregate data, including with reduce and user-defined functions. This playground is a jq subset: it runs pipes, map, and select, and it does not run reduce, try, or foreach.
For everyday API field extraction, the subset is enough. For recursive descent, try/catch, or custom functions, use the jq CLI or a JavaScript script.