jsonlkit.com
JSONL (JSON Lines) utilities, in the browser
Say hi →

JSONL Query (jq-style)

updated 11 May 2026 · live query playground

100% client-side. No upload.

Query

Supported: .foo, .foo.bar, .[], .[0], .[0:5], | pipes, select(expr), map(expr), length, keys, values, type, has("k"), not, {a, b: .x} object construction, [expr] array construction, arithmetic (+ - * /), comparisons (== != < <= > >=), boolean (and or), string functions tostring, ascii_downcase, ascii_upcase, contains, startswith, endswith, plus sort_by(.k), group_by(.k), unique, min, max, add.

Drop a .jsonl file here, or

JSONL Query Playground

An interactive jq-style query environment for JSONL streams, running entirely in your browser — no install, no upload. Supports the subset of jq that covers the day-to-day use cases: path access, pipes, select, map, object/array construction, sort_by, group_by, and string functions. For the long tail of jq features, fall back to the jq CLI; for everything else, this is faster than spinning up a terminal. 100% in-browser.

Five queries that cover 90% of jq usage

Pluck fields

.[] | {id, name}

For each record in the stream, emit an object with just id and name.

Filter

.[] | select(.age >= 30 and .role == "admin")

Keep records matching a condition.

Top-N by a field

[.] | sort_by(.age) | reverse | .[0:5]

Slurp into an array, sort descending by age, take the first five. (Or hit the Slurp button so you can start the query with sort_by(...) directly.)

Group and count

group_by(.category) | map({key: .[0].category, count: length})

One row per category with the count.

Project + rename

.[] | {user_id: .id, email: .user.email}

Build a flat output schema from a nested input.

Slurp vs stream

Stream mode (default): treats each input line as a separate JSON value and applies the query to each. Match this with .[] in the query when you want the "outer loop" semantics.

Slurp mode: reads the whole input into a single JSON array first, then applies the query once. Required for aggregations across the whole file — sort_by, group_by, add, etc.

Tips & common pitfalls

Related tools