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, and the text you paste and the files you open are never sent to a server for that. There are no ads. The site counts visits with Google Analytics, which sees which page you opened, and keeps its own anonymous tally of what kind of comparisons are made (for example “a Word file, about 500 lines”), but neither ever sees the text you compare. If you copy a share link, the text is packed into the link itself, in the part after the # that is never sent to a server or to analytics. Your history and saves stay in your browser unless you sign in. If you do, they are uploaded to your account, but only after they are encrypted in your browser with a passphrase only you know, so nobody else can read them. The site stores your email address and that encrypted data, and can see how much you have saved but not what it says.

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.