text.compare

Compare JSON online

Paste two JSON documents to see the differences line by line with syntax highlighting, then switch to the Data tab for a structural comparison. The Data view lists each change by its path, such as items[id=3].price, and ignores key order, so reformatted or reordered JSON only shows real changes.

Lists of objects are matched by an id, key, uuid or name field when every item has one, so an item that moved within an array isn't reported as changed.

How to compare JSON

  1. Paste or drop the two JSON files, one on each side.
  2. Open the Data tab to see changes by path, or stay in the text view to see them in place.
  3. Use Tools, Format JSON and sort keys to line both files up if their formatting differs.

Questions

Does key order matter?

Not in the Data view: two objects with the same keys and values are equal whatever order the keys are in. In the text view, use Tools, Format JSON and sort keys to normalise both sides first.

How are arrays compared?

If every item in both arrays is an object with a unique id, key, _id, uuid, code or name field, items are matched by that field. Otherwise they are compared by position.

Is my text uploaded anywhere?

Not to compare it. The comparison runs entirely in your browser. Text and files are not uploaded. There are no ads, accounts or analytics. History is off by default. You can opt in to local history or manually save comparisons in your browser; do not save sensitive secrets.

text.compare

Compare two texts and see exactly what changed. The comparison runs in your browser, and this site has no ads.

Privacy

Keyboard

F7 or Alt ↓
Next change
Shift F7 or Alt ↑
Previous change
Ctrl F
Find and replace in a side
Ctrl Z
Undo an edit or merge
Ctrl S
Save the comparison to your library
?
Show this help

Tips

Free and open source under the GNU AGPL-3.0 license, made by James Patton. Get the code on GitHub and host your own copy. If it saves you time, you can buy me a coffee.

Copy this

Your browser blocked automatic copying. Select the text below and copy it.