JSON diff
Compare JSON objects online and find added, removed, or changed values by path. This JSON diff ignores whitespace and object-key order, while preserving array order.
Format either input to make it easier to read. Keep exact long numeric IDs and decimals in quotes.
How to compare two JSON documents
- Paste the original JSON on the left and the updated JSON on the right.
- Use Format both or the Format button above either editor to add readable indentation. Choose 2 spaces, 4 spaces, or tabs.
- Select Compare JSON. Both documents are validated before comparison.
- Review each added, removed, or changed path. Copy or download the difference report.
Common questions
Can I format JSON before comparing it?
Yes. Format both makes both documents readable in one step, or you can format and minify each input separately. The editors include syntax highlighting, line numbers, folding and undo. Formatting changes indentation; the comparison still ignores whitespace and object-key order.
Does JSON key order affect the comparison?
No. Object keys are compared by name, regardless of their order or indentation. Array order is significant: array items are compared by index.
What do added, removed, and changed mean?
Added means a key or index exists only in the updated document. Removed means it exists only in the original. Changed means the value or type at the same path differs.
Can I compare nested JSON objects?
Yes. The comparison follows nested objects and arrays and reports their JSON paths. A number and a string containing the same digits are treated as different values.
Is JSON diff the same as JSON Patch?
No. The downloadable report lists paths, change types, and before/after values for review. It is not an RFC 6902 JSON Patch document and should not be sent directly to a patch API.