API Payload Diff
Compare two JSON or XML responses and see what actually changed
- Runs in your browser
- JSON and XML
- Type-change detection
About API Payload Diff
Paste two API responses to get a structural diff: added and removed fields, changed values, type changes such as a number becoming a string, and moved array items, each with its exact path. Key order and formatting are ignored. You can pick which changes to merge into a result you can copy, and copy the differences as a JSON Patch, all in your browser.
Structural diff vs text diff
A text diff reports every changed line, including ones where only key order or indentation moved. A structural diff compares the parsed data, so reordered keys and formatting are ignored and you see the changes that affect clients: a field added, removed, changed in value, changed in type or moved.
Common uses
- Comparing a response from staging with production
- Checking what a backend change did to an endpoint’s output
- Spotting a number that started arriving as a string
- Copying the differences as a JSON Patch to apply elsewhere
Arrays and XML
By default, arrays are matched smartly on a field such as id, uuid, key or code when items have one. You can also compare by position, ignore order, or choose the key yourself. Matching by key avoids a cascade of false changes when one item is inserted near the top. XML is compared by element and attribute with the same path-based view.
Further reading
Questions people ask
- Are my payloads uploaded?
- No. Both payloads are compared in your browser. That makes it suitable for responses that contain customer data, though you should still follow your organization’s data rules.
- What is JSON Patch?
- A standard format (RFC 6902) for describing changes to a JSON document as a list of operations such as add, remove, replace and move. Many libraries can apply it. The patch always covers the full difference between the two payloads, not only the changes you selected to merge.
- How large can the payloads be?
- Up to 5 MB on each side. Extremely deep or very large structures are refused with a message, to keep your browser responsive.