JSONL Diff Tool
JSONL diff. Compare two JSONL (JSON Lines) files by a key (such as id) or by line position. Shows added, removed and changed records with field-level diff. Browser-only.
100% client-side. No upload.
Compare
JSONL Diff / Compare
Compare two JSONL files and see exactly what changed. Match records by a key path (the right answer 95% of the time — comparing two snapshots of a dataset by id), by line position (when the files are supposed to be parallel), or by canonical-object equality. Get added / removed / changed counts plus a per-field diff for each changed record. 100% in-browser.
Match modes
Key path (semantic)
The default. Pair records from A and B by the value at a chosen path (e.g. id).
Records in A whose key has no match in B are reported as removed; records
in B whose key has no match in A are added; pairs where the rest of the
record differs are changed, with a per-field diff.
Line position
Pair record N from A with record N from B. Use this when both files are expected to be the same length and in the same order — e.g. comparing the output of two pipeline runs.
Canonical object
Sort keys recursively and compare whole records. A record in A is "still present" in B if some record in B has the exact same canonical form, regardless of where it sits. Tells you what set of records changed, not which ones; faster than per-field diff on big files.
Per-field diff
For changed records, the diff lists each field that differs:
id=42 (changed):
- age: 30
+ age: 31
- city: "Berlin"
+ city: "Munich"
+ email: "[email protected]" (added)
- phone: "..." (removed)
Tips & common pitfalls
- Key path mode needs unique keys. If multiple records in A share the same key value, only the first is paired. Dedupe first or pick a more specific path.
- Float comparison is exact.
0.1 + 0.2≠0.3; if you need tolerant comparison, round both files first. - Order of fields doesn't matter in semantic / canonical modes. It does matter in raw text diff; use a text diff tool for that.
Before you start
You need two JSONL files — typically v1 and v2 of the same dataset. The diff matches records either by a key (recommended) or by their position in the file.
How to use it
- Paste or drop the "before" file into the left pane and the "after" file into the right.
- Pick the match mode: by key (e.g.
id) or by position. - Click Diff. The result table shows added, removed and changed records with the changed fields highlighted.
Match modes
By key
Each record is identified by the value at the given key path (e.g. id, uuid, user.email). Records present in both files are compared; records only in one are flagged as added or removed. This is what you want for most use cases.
By position
Line N in the left pane is compared to line N in the right pane. Sensitive to row order — use only for files that maintain order (e.g. log replays).
Tips & common pitfalls
- Match by a stable key. An auto-incrementing
row_idthat differs between exports will make every record look "changed". - Sort first with the Sorter if your two files have records in different orders.
- For very large files, sample first with the Sampler to debug the diff configuration on 1k rows before running the full comparison.
Frequently asked questions
Can it show what changed inside a record?
Yes — the diff drills down into nested objects and reports field-level changes for keys whose values differ.
Both files must have the same schema?
No. Missing keys on one side are treated as "absent" and flagged accordingly.