Compare JSON
Paste or open two JSON documents to see what was added, removed and changed, whatever the key order or formatting, or . Your text is processed in your browser. Our tools never upload it.
Arrays are shown sorted, so matching items line up.
How it compares
- Key order and formatting never count. Two objects with the same keys and values are the same.
- Array order counts, unless you turn on Ignore array order.
- Numbers are compared exactly: 1 and 1.0 are equal, and two long IDs are equal only if every digit matches.
- Types count: "5" and 5 are different, and so are null and a missing key.
- Keys you list under Ignore keys are left out of both documents, at any depth.
For example, comparing a customer record before and after an update gives:
Questions
Does the order of keys matter?
No. Two objects with the same keys and values are the same, whatever order the keys are written in. Spacing and line breaks never count either.
Does the order of items in an array matter?
Yes, unless you turn on Ignore array order. With it on, an array matches when it holds the same items in any order.
How do I compare two API responses?
Paste one response in each box. Put the keys that differ every time, such as timestamps and request IDs, in Ignore keys, and the list shows only the changes that matter.
Can I compare two JSON files?
Yes. Use Open file on each box, or drop a file onto a box. Your browser reads the file on your device: it is never uploaded.
What if my JSON is not valid?
The page tells you which box, line and column has the problem and what it expected there. Fix it and the comparison appears.
Are large numbers compared exactly?
Yes. Long IDs and precise decimals are compared digit by digit, so two different 19-digit IDs are never reported as equal.
Is my JSON uploaded anywhere?
No. The comparison runs in your browser with JavaScript. Our tools never upload what you paste or open.
Does it work offline?
Yes, once the page has loaded. The tool keeps working with your internet switched off, because it runs entirely in your browser.