jq Online Tester

Run jq filters on JSON in your browser, with pipes, select, map, reduce, paths, regex and dates, and the -r, -c, -s, -n and --arg options.

Processed on your device. Files are not uploaded

How to test a jq filter

  1. Paste your JSON

    Paste or type your JSON into the box, or press Try an example.

  2. Write the filter

    Type a jq filter; the result updates as you type.

  3. Set the flags

    Raw output, compact lines, slurp, null input and --arg variables work like the command line.

Worked example

This is what jq Online Tester gives for its own sample values. Open the tool above and change anything to try your own.

JSON input

{
  "orders": [
    { "id": 1042, "customer": "Ada", "status": "shipped", "items": [{ "sku": "A-1", "price": 12.5, "qty": 2 }, { "sku": "B-7", "price": 4, "qty": 1 }] },
    { "id": 1043, "customer": "Linus", "status": "pending", "items": [{ "sku": "A-1", "price": 12.5, "qty": 1 }] },
    { "id": 1044, "customer": "Grace", "status": "shipped", "items": [{ "sku": "C-3", "price": 99, "qty": 1 }] }
  ]
}
Raw strings (-r)
No
One line per result (-c)
No
Read every input into one array (-s)
No
Ignore the input (-n)
No
Sort object keys (-S)
No

2 results

{
  "id": 1042,
  "customer": "Ada",
  "total": 29
}
{
  "id": 1044,
  "customer": "Grace",
  "total": 99
}

When to use jq Online Tester

You are writing a jq command for a script or CI step and want to try it on real data before running it.

A large API response needs to be filtered, reshaped or totalled, and you know a little jq or want to learn.

Tips for a better jq Online Tester result

Build filters step by step with pipes, checking the output after each step before adding the next one.

Use the raw output option when the result is text for a shell script, so strings come out without quotes.

jq Online Tester: limits and what to check

Object keys that look like numbers are listed first by the browser, so key order can differ from jq on the command line.

Very large inputs or deeply recursive filters may hit the step limit, which stops the run instead of freezing the page.

About jq Online Tester

Build and debug jq filters without a terminal. The tester runs jq's language in your browser: paths and slices, pipes and commas, select, map, reduce, foreach, def, variables and destructuring, string interpolation and @csv, @tsv and @base64, assignment with |= and +=, regular expressions and date functions.

FAQs

Does it support every jq feature?

The everyday language and most built-ins. Not supported: input and inputs (use the slurp option), streaming, label and break, SQL-style built-ins and modules.

Can I use several JSON values as input?

Yes. Values separated by whitespace or newlines are each run through the filter, as jq does.

What happens if my filter loops forever?

It is stopped after a few million steps with a message, instead of freezing the page.

Related tools