JSON Lines / NDJSON Viewer

Paste a JSON Lines (a.k.a. NDJSON, .jsonl) stream — one JSON value per line — and see every line parsed with its line number, a validity flag, the raw text, and a pretty-printed value. Filter by kind, search by substring, evaluate a tiny dotted JSONPath ($.user.name, $.items[0].sku, $.items[*].sku), and export the filtered valid rows as NDJSON or a JSON array. Pure client-side, no upload, no tracking.

One JSON value per line. Blank lines and # … comments are tolerated. CR / CRLF / LF all work.

Kind filter
How this works
  • Each line is run through JSON.parse. Lines that parse cleanly are marked valid; lines that don't are marked invalid with the parser's error message and (when available) the column offset. Lines whose first non-whitespace character is # are treated as comments; empty and whitespace-only lines are treated as blank. None of these are errors — they're surfaced so you can see them.
  • The kind filter at the top controls which rows show up in the table. All shows every line, Valid only hides blanks / comments / invalid lines, Invalid only shows just the parser rejections, Valid + invalid hides blanks and comments.
  • Substring search is case-insensitive and matches against the raw line text (not the parsed value). JSONPath is evaluated against each valid row's parsed value and shown in the value column when present.
  • JSONPath syntax: $ is the root; .key indexes into an object; [n] indexes into an array (negative indices allowed); [*] expands to an array of every match; and the two can be chained: $.items[*].sku. An invalid path disables the column (rather than throwing).
  • Click the raw, pretty, or path chip on any row to copy it. Click a row's value cell to open the row in a detail pane (line number, raw, pretty-printed value, JSONPath result).
  • Copy as NDJSON emits one JSON value per line, re-stringified with JSON.stringify so output is canonical (sorted keys not guaranteed, but whitespace / quoting always normalised). Copy as JSON array emits a single [ … ] document. Download saves the NDJSON output as ndjson.txt.
  • The page is built on top of src/lib/tools/ndjson.ts — every function on this page is unit-tested (65 cases). Nothing leaves your browser.