json diff
runs in your browser, nothing is uploaded
IDLE
Compare two JSON documents by their structure, not their text. Paste one into tab a and the other into tab b to see what was added, removed or changed, path by path.
What counts as a difference
Objects are compared key by key, so a different key order is not a change. Numbers are compared by value, so 1 and 1.0 are equal, while very long integers are compared digit by digit. Every difference is listed with its path, such as $.env.LOG_LEVEL, and the values on each side.
Arrays are lined up before they are compared. When one item is inserted near the start of a list, you see one addition rather than a change to every item after it. Items that changed in place are compared inside, so you see which field changed.
Reading and saving the result
Additions, removals and changes are marked +, - and ~ and counted at the top. Click any row to open that spot in the tree of the document it belongs to. Copy puts the list on the clipboard, and save writes it as a text file.
Very long arrays that would take too long to line up are compared position by position, and the list shows the first 2,000 differences with the total.
Questions
Why does reordering keys show no difference?
In JSON, key order carries no meaning, so this diff ignores it. For a line-by-line comparison, format both documents and use a text diff.
What about duplicate keys?
When an object repeats a key, the last value is compared, which is how most programs read it. The formatter lists duplicate keys if you want to find them.
Can it ignore the order of an array?
Not at the moment. Arrays are compared in order, with insertions and removals detected.
Are the documents uploaded?
No. Both tabs are compared in this page.