JSON Diff
Max 512 KB per side · Compares automatically as you type
Processed entirely in your browser — nothing is sent to a server.
Comparing two JSON documents by eye — scrolling between two long, similarly-shaped blocks of text looking for the one field that changed — is slow and error-prone. This tool does it structurally: paste the original on the left and the updated version on the right, and it shows exactly which keys were added, removed, or changed, with capture groups for arrays broken out precisely from cosmetic reordering.
This is a structural diff, not a text diff. The distinction matters: a text diff compares characters and lines, so reindenting a file or reordering its keys would show up as changes even though nothing about the data actually changed. This tool parses both sides into real JSON values first and compares the DATA — key order and whitespace are never meaningful in JSON to begin with, so two documents that only differ in formatting show zero differences.
Arrays get special handling. Comparing arrays index-by-index would report every element as “changed” the moment one element near the start moves, even if nothing about the array’s actual contents changed — just their positions. This tool instead matches array elements that are genuinely identical between the two sides (the same technique behind most line-based diff tools), so a pure reorder shows only what actually needs to move, not everything downstream of it. The one honest limitation: an element that changed slightly, rather than moved, isn’t matched to its former self — it shows as an old one removed and a new one added at that position, since deciding two different-but-similar objects “are” the same logical record would need a much more speculative kind of matching. See the FAQ for the full story.
Nothing leaves your browser. Parsing and diffing both run entirely client-side. A comparison in progress is saved to your browser’s own local storage as a convenience — so an accidental reload doesn’t lose your work — and restored visibly (never silently) the next time you open the tool, with a clear option to discard it.
Large arrays get a Web Worker, not the main thread — diffing a big array with many differences is the one case on this tool genuinely worth the overhead of moving off the page’s own thread, so it doesn’t lock up the tab while comparing.
Examples
- Comparing two versions of an API response — paste last week's response on the left and today's on the right to see exactly which fields were added, removed, or changed, without manually scanning two large blocks of JSON side by side.
- Checking config drift between environments — compare a staging config against production to catch a setting that was changed (or forgotten) in one environment but not the other. For formatting either file for easier reading first, see JSON Formatter; for shrinking a corrected config back down before deploying it, see JSON Minifier.
- Confirming a data migration reordered records without corrupting them — paste the same dataset before and after a sort/reshuffle to confirm the array shows only the expected moves, not spurious 'changed' entries for records whose values never actually changed.
Frequently asked questions
Does reordering keys or reformatting count as a difference?
How does this tell an array reorder apart from real changes?
Why does changing one field of one object in an array show as remove+add instead of 'changed'?
{'{'}"id":1,"name":"A"{'}'} to {'{'}"id":1,"name":"B"{'}'} inside an array, the two objects are no longer identical, so they're not matched to each other — the tool reports the old one removed and the new one added at that position, rather than guessing that they represent the same logical record with one field changed. Detecting that would require matching objects by something like a shared id field, which is a real, more speculative feature this tool doesn't attempt. If this matters for your data, compare the two objects directly rather than the arrays that contain them.