Open, search, filter, and inspect JSON Lines (.jsonl / .ndjson) files up to 50 MB locally in your browser. Built for OpenAI fine-tuning datasets, Claude Code session transcripts, and structured server logs—zero uploads.
Paste JSONL lines above, drop a .jsonl file, or click a sample preset
Parsed automatically in your browser—supports Table view, collapsible Tree inspection, broken-line repair, and CSV/JSON export.
What Is JSONL (JSON Lines / NDJSON) and Why AI & Log Pipelines Use It?
JSON Lines (.jsonl), also known as Newline Delimited JSON (.ndjson), stores one complete, self-contained JSON value per line separated by a newline (\n). Unlike a standard JSON array where a single missing comma or truncated tail breaks the entire file, JSONL can be streamed line-by-line in O(1) memory, appended without rewriting earlier bytes, and parsed fault-tolerantly—making it the universal standard for LLM fine-tuning corpora, AI coding agent session transcripts (such as Claude Code), and structured production telemetry.
JSONL / NDJSON vs. Standard JSON Array
Key engineering differences that explain why datasets and logs prefer JSONL over monolithic .json files.
Dimension
JSONL / NDJSON
Standard JSON Array ([...])
Memory Footprint
O(1) streaming — read and process 1 line at a time even on multi-GB files
O(n) — standard parsers load and parse the entire file into memory at once
Appendability
Append-only friendly — simply write a new line to the end of the file
Must seek back, strip closing ], append comma, and rewrite closing ]
Fault Isolation
A corrupted line affects only that line; all other records remain parseable
A single syntax error or crash mid-write invalidates the entire document
Each line contains a messages array of {role, content} turns. Table view automatically summarizes turn counts and the latest message while clicking any row opens the full conversation tree.
Session logs store user prompts, assistant tool calls, token usage, and timestamps as sequential JSONL events. Inspect sensitive local coding transcripts privately without uploading them anywhere.
Each event carries timestamp, level, service, status, and latency fields. Filter to errors only or repair trailing-comma broken lines in one click.
Working with Multi-GB JSONL Files Locally (CLI & Code)
When a dataset exceeds browser RAM (>50 MB), use these zero-upload streaming snippets.
Python (Streaming O(1) Memory)
import json
with open("dataset.jsonl", "r", encoding="utf-8-sig") as f:
for line_no, line in enumerate(f, 1):
if not line.strip():
continue
record = json.loads(line)
Node.js (readline Stream)
import fs from 'node:fs'
import readline from 'node:readline'
const rl = readline.createInterface({ input: fs.createReadStream('logs.jsonl') })
for await (const line of rl) {
if (!line.trim()) continue
const row = JSON.parse(line)
}
jq (Filter & Convert to JSON Array)
# Filter error records only
jq 'select(.level == "error")' app.jsonl
# Slurp JSONL lines into a single JSON array
jq -s '.' dataset.jsonl > dataset.json
DuckDB (SQL Directly on .jsonl)
-- Query a 5 GB JSONL file with SQL in milliseconds
SELECT level, COUNT(*) AS hits
FROM read_json_auto('app.jsonl')
GROUP BY level;
Frequently Asked Questions
What is the difference between JSONL and NDJSON?
In practice they are nearly identical: both store one valid UTF-8 JSON value per newline-delimited line. JSONL (jsonlines.org) and NDJSON (ndjson.org) are interchangeable across Python, jq, BigQuery, Spark, OpenAI, and this viewer.
Can I safely open Claude Code session .jsonl logs or proprietary OpenAI fine-tuning datasets here?
Yes. Every byte is parsed, searched, filtered, and exported strictly inside your local browser memory via the Web File API. Nothing is uploaded to any server—you can verify this in the browser Network tab.
Why does line 1 of my .jsonl file fail to parse in Python or jq?
Two classic culprits: a hidden UTF-8 BOM (0xEF 0xBB 0xBF) written by Windows editors/Excel, or pretty-printed multi-line JSON objects (each JSONL record must fit on a single line). This viewer strips UTF-8 BOM automatically and flags exact line numbers for syntax errors.
How do I convert a JSONL file to a normal JSON array or Excel CSV?
Load or paste your .jsonl file, then click "Download .json" to wrap all valid lines into a formatted JSON array [...], or click "Export CSV" to generate an Excel-ready UTF-8 CSV table with all detected top-level columns.
What happens if a few lines in my log file are truncated or have trailing commas?
Unlike strict parsers that fail completely on the first error, this viewer isolates malformed lines, displays all valid records cleanly, lets you filter to "Errors", and offers a 1-click "Auto-Repair Broken Lines" button.
How large of a .jsonl file can this browser tool handle?
You can open files up to 50 MB directly in the browser. For files larger than 120 KB, the raw text box auto-collapses and results render via pagination (50–200 rows per page) so scrolling stays fast and smooth.