Compare API responses
Remove layout differences to inspect changed values. Preserve array order when positions belong to the contract.
Compare two JSON documents and highlight structural differences. Processing stays local in your browser.
Compare two JSON documents after normalizing layout and object property order. A one-line API response may therefore match the same response formatted differently. Value types and array order still matter: "1" is not the number 1, and a reordered list is different. Both sources stay in the browser. Output is a readable text report, not a new JSON document or a patch to apply automatically.
Both inputs must follow JSON syntax. The engine parses values, recursively sorts object keys and serializes them with common formatting. Layout whitespace and written property order stop producing artificial differences. Whitespace inside strings remains significant.
Arrays are not sorted and their objects are not matched by identifier. Moving an entry remains a difference. Strings, numbers, booleans and null are compared as parsed values. A missing key differs from a key containing null. Duplicate names follow JSON parsing behavior, retaining the last occurrence; avoid that ambiguous representation.
When normalized forms differ, each line is compared with the same position in the other document. - identifies the first input and + the second; shared lines have a space prefix. An insertion can shift several lines, producing a longer report than the smallest logical change. This is neither a path-based semantic diff nor JSON Patch.
Unsafe JavaScript integers and numbers parsed as nonfinite are rejected to avoid declaring distinct rounded identifiers equivalent. Decimal values still follow browser numeric precision. Use contractual string representations for long identifiers; choose text comparison when exact written tokens matter.
Paste or import each document separately. Put the reference first to read - as old values and + as new values.
Read the equivalence message or report. Numeric rejection indicates a representation limit, not a calculated difference between the values.
Check surrounding lines before assuming several independent changes. Copy or download the .txt report. Editing either source hides old output.
Remove layout differences to inspect changed values. Preserve array order when positions belong to the contract.
Compare reference and edited versions without confusing indentation with data changes. JSON5 comments are not supported.
Find a number changed into a string or a boolean replaced with text even when their visual display looks similar.
Both objects have identical keys and values. Reordering properties introduces no structural difference after normalization.
Input
{"b":2,"a":1}
{"a":1,"b":2}Result
The JSON documents are equivalent.The removed line contains a number and the added line a string. Quotes indicate a real type change rather than presentation.
Input
{"id":1}
{"id":"1"}Result
{
- "id": 1
+ "id": "1"
}Values are compared after sorting object properties and applying common layout. Presentation whitespace and key order alone do not change an object.
No. Entry order remains significant. The engine does not search for id fields or automatically match moved objects.
No. The - and + signs describe a text report on normalized documents. Output does not contain JSON Patch operations and paths.
JavaScript parsing could round distinct integers to the same value. Rejection prevents false equivalence. Use string identifiers when your contract allows them.
Related tools
Tools similar or complementary to this one.
Format, minify, and validate JSON to make it easier to read or more compact.
Validate a JSON document against a schema and locate every error precisely.
Compare two Excel or CSV files using a key column and spot the differences.
Understand ISO 8601 week numbers, Unix timestamps in seconds or milliseconds, and the difference between human-readable dates and technical time values.