data · Browser tool
Structured Diff Checker
Compare two JSON, CSV or XML documents by the shape of the data, so a reordered file does not read as a thousand changes.
Format
The first CSV row is read as a header. Pick a column to match rows by an identifier instead of by position — that way an inserted row does not shift everything below it.
Original (A)
Changed (B)
Differences
Why a line diff misleads you here
Line-based tools compare text. Reformat a JSON file, move a key to the top, or let a serialiser sort its output differently, and every line changes even though the data is identical. Worse, a genuine change buried in a reformatted file disappears into the noise. This page parses both sides first and then compares the parsed values, so the answer is about the data rather than the whitespace.
What each format compares
JSON is walked key by key. Object keys are matched by name and order is ignored, which matches how JSON objects actually behave. Arrays are matched by position, because an array's order carries meaning — a value moved from index 2 to index 5 shows as two changes, which is honest rather than clever. There is no attempt to guess that a list was reordered.
CSV is parsed with the quoting rules from RFC 4180: a field wrapped in double quotes may contain commas, line breaks and doubled quotes. The first row is treated as a header. By default rows line up by position, so an inserted row at the top reports everything below it as changed. Choosing a key column fixes that: rows are matched on that column's value and only the cells that really differ are listed.
XML uses the browser's own DOMParser. Each element gets a path built from its ancestors with a positional index among same-named siblings, such as /orders/order[2]/total. Text content and every attribute are compared at that path. Comments and processing instructions are skipped, and whitespace-only text between elements is ignored, since almost no XML format treats it as data.
Limits worth knowing
Each side is capped at 400,000 characters. Past that the parse and the comparison start to take long enough to make the tab feel stuck, so the page refuses with a message instead. The differences table shows the first 800 entries; the CSV download contains all of them. Numbers are compared as JavaScript numbers, so a JSON integer larger than 253 loses precision on both sides equally and will not be flagged — that is a limit of the language, not of the comparison.