Home / JSON compare

JSON compare

Paste two JSON documents to get a list of every difference with its path, such as $.address.zip. Key order is ignored, so only real changes show.
Your JSON never leaves your device: everything runs in this page. No upload, no sign-up.

Original JSON

Changed JSON

Differences

How to compare JSON

  1. Paste or drop the first JSON on the left and the second on the right. Format tidies a minified document.
  2. The list of differences appears below: each changed, added or removed value, with its path and both values.
  3. Switch to Side by side to see both documents formatted the same way, with changed lines highlighted.
  4. Copy the list or download it as CSV.

How differences are found

  • Key order does not matter. {"a":1,"b":2} and {"b":2,"a":1} are the same data, so they show no difference. If only the order differs, the summary says so.
  • Paths show where each difference is: $ is the top, .name a key and [2] the third item of an array (counting from 0). Keys with spaces or symbols are written ["my key"].
  • Arrays are lined up by content, so inserting one item at the start does not mark every later item as changed. When an item was edited, its fields are compared one by one. An index like [1→2] means item 1 on the left lines up with item 2 on the right.
  • Ignore the order of array items treats arrays as sets: ["a","b"] and ["b","a"] match. Use it for lists of tags, IDs or permissions.
  • Long numbers are exact. IDs longer than 15 digits, such as 12345678901234567890, are compared digit by digit. Tools that read JSON with JavaScript's standard parser round them, so two different IDs can look equal there. Why this happens.
  • Types count: 1 and "1" are different, and the list says the type changed. 1 and 1.0 are the same number.

Invalid JSON

If a document cannot be read, the error says where (line and column) and gives a hint for the two most common mistakes: a comma before } or ], and single quotes instead of double quotes.

Related tools

Guides

Questions

Does key order matter when comparing JSON?

No. JSON objects have no order, so keys in a different order are not a difference.

Can I compare JSON arrays regardless of order?

Yes. Turn on Ignore the order of array items.

Is my JSON sent to a server?

No. Parsing and comparing happen in your browser. Nothing is uploaded.

Does it handle large IDs over 2^53?

Yes. Numbers with more digits than JavaScript can hold exactly (above 9,007,199,254,740,991) are kept as written and compared digit by digit, and the summary says how many it found.

Can I export the differences?

Yes. Copy gives one difference per line (change, path, old value, new value, separated by tabs). Download CSV opens in Excel.