Developer tool · runs in your browser
JSON diff online: compare two JSON, CSV or XML files by structure
Paste the original into File A and the changed version into File B. The list of added, removed and changed fields updates as you type. Reordered JSON keys do not count as changes.
Free · no account · no job limit · nothing is uploaded
File A original
File B changed
Both panes open with a short example so you can see a result. Select the text in each pane and paste your own data over it. The differences below refresh on every change.
Differences
Want the tool on a page of its own? Open the full-page workspace
What the result shows
- One row per differenceEach row names the change (added, removed or changed), the full path such as
$.customer.nameor/orders/order[2]/total, and the value in A and in B. - A count in one lineFor example: 4 differences: 1 added, 0 removed, 3 changed. When the data is the same, it says so, whatever the formatting.
- A CSV downloadThe table shows the first 800 differences. The CSV file holds all of them, with the columns change, path, in_a and in_b.
- Clear parse errorsIf a side is not valid JSON, CSV or XML, the message names that side and the reason, for example an unclosed quoted CSV field and its line.
How each format is compared
JSON
Both sides are parsed and walked key by key. Keys are matched by name, so their order does not matter. Arrays are matched by position, because the order of an array carries meaning: an item moved from index 2 to index 5 shows as two changes. The tool does not guess that a list was reordered.
CSV
CSV is read with the quoting rules of RFC 4180, so a quoted field may contain commas, line breaks and doubled quotes. The first row is the header, and columns are matched by header name, so a moved column is still the same column. Rows line up by position unless you pick a key column, such as an ID. With a key column, rows are matched on that value and only the cells that differ are listed.
XML
XML is parsed by your browser. Each element gets a path built from its parents, with an index among siblings of the same name. Text and every attribute are compared at that path. Comments and whitespace-only text between elements are ignored.
Limits
Each side can hold up to 400,000 characters. Past that, the page stops with a message so the tab stays usable. Numbers are compared as JavaScript numbers, so a JSON integer larger than 253 loses precision on both sides and a change in it may not be flagged.
When a text diff is the better choice
Use this tool for data: records, settings, API responses and database exports, where the structure carries the meaning. For source code, Markdown or templates with comments, a line-based text diff is more useful, because formatting and comments matter there. Excel files are not read directly: export each sheet as CSV first.
Questions before you run it
How is this different from a regular text diff?
A text diff compares lines of text. This tool parses the structure first (JSON objects, CSV columns, XML elements) and then compares the values within that structure. Reordered JSON keys and moved CSV columns are not reported as changes.
Which file formats are supported?
JSON, CSV and XML. Both sides are read in the format you pick under Compare as. CSV must be comma-separated with a header in the first row. JSON Lines is not read as such; wrap the records in an array first.
Is there a size limit?
Each side can hold up to 400,000 characters. Past that, the page stops with a message so the tab stays usable. The table shows the first 800 differences; the CSV download contains all of them.
Is my data uploaded to a server?
No. Parsing and comparing run in your browser, and the text you paste is not sent to a server.
How are JSON arrays compared?
By position. An item that moved from index 2 to index 5 shows as two changes. The tool does not try to guess that a list was reordered.
Can I diff Excel files?
Not directly. Export each sheet as CSV, paste both, and pick a key column such as an ID so rows are matched by that value instead of by position. Columns are matched by header name, so a different column order is not reported as a change.