DiagramPreview
Basic parserNo AILocal previewDebuggingExport

jq Filter Tester

Paste a jq-style filter and JSON payload to preview common filters such as keys, length, .items[].id, and map(.field) in the browser.

Examples
Filtered JSON resultReady
Your preview will appear here.

Continue with a related tool

Move this preview into a nearby workflow for conversion, debugging, or export.

How to use

  1. 1Put the jq filter on the first line, then add --- and the JSON payload.
  2. 2Start with simple selectors such as .items[] before adding maps, pipes, or object construction.
  3. 3Check the filtered result and rows before copying the expression into scripts or docs.
  4. 4Verify complex filters with real jq when they will run in CI or production automation.

Common use cases

API JSON filteringSupport script reviewCI snippet validationAI jq output checkingDocumentation examples

FAQ

Why does the input use ---?

The separator keeps the jq filter separate from the JSON document being inspected.

Is this full jq?

No. It covers common preview cases. Use jq itself for advanced functions, modules, streaming, and production automation.

How should I debug a jq filter?

Start with the smallest selector that returns data, then add pipes and mapping one step at a time.

jq Filter Tester previews common jq-style filters against JSON so you can inspect API payloads and generated JSON without switching tools.

It is useful for support scripts, CI checks, documentation examples, and AI-generated JSON transformations that need quick verification.

The preview shows filtered output and result rows for common filters; final production behavior should still be verified with jq in your runtime environment.

Demo: extract failed API checks from JSON

jq filters are easiest to review when the input includes both matching and non-matching rows. That makes it clear whether the filter is too broad or too narrow.

  • Start with .checks[] to inspect item shape.
  • Add select(.status != "ok") only after confirming the field name.
  • Build a small output object when the result will become a report.
.checks[] | select(.status != "ok") | {name, status, duration}
---
{
  "checks": [
    {"name": "db", "status": "ok", "duration": 32},
    {"name": "api", "status": "failed", "duration": 914}
  ]
}

Debug pattern: build jq filters in small steps

Most jq mistakes come from jumping straight to a dense one-liner. For logs, API payloads, and CI artifacts, build the filter one pipe at a time and check the intermediate shape.

  • Start with keys, length, or a single array selector before adding conditions.
  • Use select(...) only after confirming the field path exists.
  • Return compact objects for reporting instead of dumping entire nested records.
.checks[]
| select(.status == "failed")
| {name, status, duration_ms, owner: .labels.team}

Review checklist for jq Filter Tester

Use jq Filter Tester when you need to inspect source content visually before it becomes documentation, a pull request note, an incident write-up, or a handoff artifact. Run common jq-style filters against JSON and preview the filtered result.

Before exporting, check that labels are readable, relationships match the source, generated examples do not contain private data, and the preview still makes sense after you edit the input.

Limits and troubleshooting

If the preview fails, reduce the input to the smallest complete example, confirm the format syntax, and then add sections back one at a time. Many rendering failures come from partial files, indentation mistakes, missing diagram headers, or copied snippets that depend on hidden context.

Treat the preview as a review surface rather than a source of truth. Generated diagrams, converted files, dashboards, and rule examples should be checked before they are used in production documentation or operations.

Example inputs to test

  • Extract emails: .users[].email --- { "users": [ {"id": 1, "email": "ada@example.com"}, {"id": 2, "email": "lin@example.com"} ] }
  • First order total: .orders[0].total --- {"orders":[{"id":"ord_1","total":49.9},{"id":"ord_2","total":19.5}]}
  • Map field: map(.name) --- [{"name":"api"},{"name":"worker"},{"name":"web"}]

Tool maturity

Basic parser

Basic parser

This tool focuses on fast structure inspection. Use it for review and debugging, then verify critical output before production use.

The maturity label is not a quality score. It tells visitors whether the tool is best for stable export, deeper debugging, quick parsing, or AI-assisted generation.