Filter a JSON Array
Filter a JSON array using a short, readable condition — score > 5 AND active = true. Comparisons, substring and regex matching, set membership, and presence checks are all supported, with dotted paths for nested fields. No jq syntax to remember.
How to filter a JSON array by condition
- Paste a JSON array. An object wrapping exactly one array is unwrapped automatically.
- Type a condition. Start simple —
score > 5— and add clauses withAND/OR. - Use dots for nested fields (
user.address.city) and brackets for array positions (tags[0]). - Tick Invert to keep everything that does not match — handy for finding the bad records rather than the good ones.
- Copy or download the matching records. The status bar shows how many of how many matched.
Expression reference
- Comparison —
=,!=,>,>=,<,<=. Numbers compare numerically; anything else compares as text. - Text —
contains,startswith,endswith, all case-insensitive. - Regex —
matches, e.g.email matches @example\.com$. - Sets —
status in active,trial,paid. - Presence —
field exists,field missing,field is null,field is not null,field is empty. - Combining —
ANDandOR, withANDbinding tighter. There are no parentheses, soa AND b OR cmeans(a AND b) OR c. - Quoting — wrap a value in single or double quotes when it contains spaces:
city = "New York".
When you need more power
This language deliberately stops at readable one-liners. For aggregation, reshaping, or anything involving computed values, use jq — full jq compiled to WebAssembly. For standards-based selection, JSONPath implements RFC 9535. If your array is really a table, export to CSV and use a spreadsheet.
Privacy
Nothing is uploaded. The conversion runs in this tab using your own browser's JavaScript engine — no server sees your data, and the page keeps working with the network disconnected.
FAQ
Why did my condition match nothing?
Usually a type mismatch or a wrong path. Check the field name with List all paths, and remember that score > "5" compares as text. A malformed expression reports an error rather than silently matching nothing.
Are parentheses supported?
No. Keeping the grammar flat keeps it predictable — AND binds tighter than OR, which covers most real filters. For anything more nested, jq is the right tool.
Can I filter on array contents?
Only by position (tags[0] = "x") or by treating the array as text (tags contains "x", which matches against the JSON form). Real any/all quantifiers need jq or JSONPath.