jq Playground & Filter Builder
Interactive jq expression tester, filter builder, and JSON transformer powered by WebAssembly.
Free interactive online jq playground and JSON query builder powered by official jq 1.8.2 compiled to WebAssembly. Test, debug, and preview jq filters against your JSON data in real time with sub-millisecond latency and total privacy. Explore dozens of ready-to-use recipes for property extraction, conditional filtering, object reshaping, array aggregation, grouping, and unique values. Toggle CLI flags like -s (slurp), -r (raw output), -S (sort keys), -c (compact), and --tab with one click, and copy ready-to-run terminal commands. All execution runs locally in your browser inside an isolated WebWorker without sending data over the network.
Keywords: jq playground, jq online, jq tester, test jq expression online, jq filter online, jq cheatsheet tester, webassembly jq, jq query builder, jq json transformer, online jq editor, jq tutorial playground, jq slurp jsonl, jq raw output
Tags: jq, json, query, filter, transform, wasm, cli, playground, jsonl
Popular Text & Data tools
- Base64 Encode/DecodeEncode and decode Base64 strings, files, and data URIs instantly.
- Text Diff CheckerCompare two text blocks and highlight exactly what changed.
- Git Conflict ResolverVisually resolve Git merge conflicts by picking current, incoming, or both versions.
- Text Case ConverterConvert text between 20+ case formats: camelCase, snake_case, kebab-case, Title Case, and more.
- Markdown PreviewPreview and render Markdown with GFM, math, Mermaid diagrams, and export options.
jq Playground & Filter Builder is also known as: Online jq Tester, jq Filter Online, Web jq Playground, jq JSON Processor Online, jq Cheatsheet Playground, jq Query Builder, jq WebAssembly Sandbox, jq Online Editor.
How to jq Playground & Filter Builder Online
Paste your JSON payload into the left editor panel, or upload a .json / .jsonl file.
Type a jq query expression in the top filter bar (e.g. .items[] | select(.price > 50) | .name).
View real-time evaluated results in the right output panel with syntax highlighting and latency metrics.
Toggle CLI flags like -r (raw output), -s (slurp stream), -S (sort keys), -c (compact), or --tab formatting.
Click "Recipes" to browse and apply 18+ pre-built patterns for grouping, aggregation, reshaping, and deduplication.
Click "CLI Command" to generate and copy the exact terminal command ready for bash, zsh, or curl pipelines.
jq Playground & Filter Builder Features
Official jq 1.8.2 engine compiled to WebAssembly running 100% locally in your browser.
Multi-threaded background execution via WebWorkers to prevent UI freezes on massive payloads or intensive queries.
Comprehensive recipe cheatsheet library spanning property extraction, conditional filtering, grouping, aggregation, and deletion.
Interactive CLI flag toggles: Raw Strings (-r), Slurp Stream (-s), Sort Object Keys (-S), Compact Output (-c), and Tab Indentation (--tab).
Automatic JSONL stream detection with one-click slurp mode activation.
Zero server compute: completely private, offline-capable, and air-gapped — your sensitive JSON never leaves your device.
Query history persistence with instant one-click restoration across browser sessions.
Real-time output metrics showing execution latency (ms), line count, byte size, and result item count.
Full support for advanced functional jq constructs: group_by, to_entries, from_entries, unique, map, reduce, and del.
One-click CLI command generator with curl and file source modes for seamless terminal workflows.
URL state synchronization allowing shareable permalinks for any filter and flag combination.
Keyboard shortcuts for power-user speed: ⌘↵ (or Ctrl+Enter) to evaluate and ⌘⇧K to reset.
Supported Formats & Dialects
The jq Playground & Filter Builder supports 6 syntax formats and dialects for accurate parsing and processing.
- Standard JSON Documents
- Single root JSON objects or arrays formatted with 2-space indentation or custom tab spacing.
- JSON Lines / JSONL Streams
- Newline-delimited JSON streams (ndjson/jsonl) processed iteratively or slurped into a unified array with -s.
- Raw Unquoted Strings (-r)
- Outputs direct string values without wrapping quotes or JSON escape sequences, ready for shell piping.
- Slurped Arrays (-s)
- Concatenates multiple disparate JSON inputs or stream objects into a single top-level array before query execution.
- Compact Minified JSON (-c)
- Condenses evaluated JSON structures onto single lines without extraneous whitespace or linebreaks.
- Key-Sorted Output (-S)
- Normalizes and alphabetically sorts all object keys in the output for deterministic JSON diffing and comparisons.
Related Standards & RFC Specifications
All StandardsPre-built Automation Pipelines
Chain jq Playground & Filter Builder with other utilities in a multi-step visual workflow.
Base64 Decode → JSON Format
Decode a Base64 string and pretty-print the JSON inside it.
CSV → JSON → YAML
Convert CSV data to JSON, then to YAML format.
JSON Format → TypeScript Schema
Format JSON and generate TypeScript/Zod schema from it.
Example Input & Output
Sample ReferenceInteractive Example: jq Playground & Filter Builder in ActionShow example
Sample Input (json)
JSON: {"users":[{"name":"Alice","age":30},{"name":"Bob","age":25}]}
Filter: .users[] | select(.age >= 30) | .nameSample Output
"Alice"What happened:
Executes JQ query filters against complex JSON trees directly in the browser with real-time expression evaluation.
Pairwise Format Converters
All ConvertersConvert JSON to YAML
Free, 100% client-side private JSON to YAML converter. Transform syntax instantly in your browser with zero data logging, strict AST validation, and CLI support.
Convert JSON to TOML
Free, 100% client-side private JSON to TOML converter. Transform syntax instantly in your browser with zero data logging, strict AST validation, and CLI support.
Convert JSON to CSV
Free, 100% client-side private JSON to CSV converter. Transform syntax instantly in your browser with zero data logging, strict AST validation, and CLI support.
Convert JSON to XML
Free, 100% client-side private JSON to XML converter. Transform syntax instantly in your browser with zero data logging, strict AST validation, and CLI support.
Convert JSON to SQL (DDL / Inserts)
Free, 100% client-side private JSON to SQL (DDL / Inserts) converter. Transform syntax instantly in your browser with zero data logging, strict AST validation, and CLI support.
Convert JSON to TypeScript Interfaces
Free, 100% client-side private JSON to TypeScript Interfaces converter. Transform syntax instantly in your browser with zero data logging, strict AST validation, and CLI support.
Frequently Asked Questions
- What is jq and what is it used for?
- jq is a lightweight, flexible command-line JSON processor written in C. It allows developers to slice, filter, map, aggregate, and reshape structured JSON data with concise functional expressions, often described as sed and awk for JSON.
- How does this online jq playground work without a backend server?
- This playground compiles the official jq 1.8.2 C codebase directly into WebAssembly (Wasm) and runs it inside a background WebWorker thread in your browser. All query parsing, compilation, and evaluation happen on your CPU with zero network transmission.
- What is the difference between jq and JSONPath?
- JSONPath is primarily a declarative query selector designed to locate and extract specific nodes from a JSON tree. jq is a full functional programming language that can not only query but also perform arithmetic calculations, construct brand-new objects, group items, merge dictionaries, and handle multi-document streams.
- How do I filter JSON array elements with conditions in jq?
- Use the select() function. For example, .items[] | select(.status == "active" and .price < 100) iterates through every item in .items and emits only those satisfying the boolean condition. To keep the output wrapped as an array, use map(select(.status == "active")).
- What is the difference between map(...) and .[] in jq?
- The .[] operator unrolls an array into a stream of individual values, emitting each element separately. In contrast, map(f) applies the expression f to every element of an array and preserves the surrounding array container in the final output.
- How do I group by a field and aggregate values in jq?
- Use group_by() combined with map(). For example: group_by(.category) | map({ category: .[0].category, count: length, total_sales: (map(.price) | add) }) groups items by their category property and outputs an array of summary objects with counts and computed totals.
- What does the -r (raw output) flag do in jq?
- By default, jq outputs valid JSON strings surrounded by double quotes (e.g. "my-token"). When you enable the -r flag, jq outputs the raw string content directly without quotes or escape characters, making it ideal for piping into bash variables, curl commands, or environment configs.
- What is the -s (slurp) flag and how does it handle JSONL streams?
- Instead of evaluating the jq filter against each JSON object in an input stream independently, the -s (slurp) flag reads the entire stream of separate JSON objects into a single top-level array and executes the filter once against that array.
- How do I remove sensitive or unwanted fields from JSON?
- Use the del() function. For example, del(.password, .token, .secret) removes top-level secret fields. To recursively strip matching fields across all nested objects, use del(.. | .password?, .secret?).
- How do I reshape nested JSON into a custom structure?
- Use object construction syntax: .data | map({ id: .id, title: .attributes.title, author: .attributes.author.name }). You can combine field renaming, nesting, and computations inside a single declarative expression.
- Is my JSON payload private and secure when using this tool?
- Yes. 100% of data processing occurs client-side inside your browser via WebAssembly and WebWorkers. No JSON payload data, query expressions, or generated outputs are ever sent to, stored on, or inspected by our servers.
- Can I export my playground query as a terminal CLI command?
- Yes. Click the "CLI Command" button in the output toolbar to copy the exact jq terminal command with all active flags (such as -r, -s, -S, -c, --tab) formatted for immediate use in bash, zsh, or terminal pipelines.
Related Developer Tools
- JSON Path TesterQuery and extract data from JSON documents using JSONPath.
- JSON FormatterPrettify, minify, and validate JSON data instantly.
- JSON Repair ToolRepair and fix malformed JSON data from AI outputs, API responses, and copy-paste.
- JSON to TypeScript & Schema GeneratorGenerate TypeScript interfaces, Zod schemas, and Valibot schemas from JSON.
- JSONL ConverterConvert between JSONL (JSON Lines / NDJSON) and standard JSON arrays with auto-detection.
- CSV to JSONConvert CSV/TSV to JSON and JSON to CSV with type inference and multiple output formats.